javascript - jQuery selector custom attribute -
javascript - jQuery selector custom attribute -
i have elements in page like
<div class="editabletxt" data-model-attr="name" data-model-id="123">some text</div>
now how write selector in jquery based on 2 custom attribute values. want select element data-model-attr="name" data-model-id="123"
i want unique element. utilize 2 attributes.
use this
$("[data-model-attr='name'][data-model-id='123']")
javascript jquery
Comments
Post a Comment