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

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -