javascript - How to select elements with second data atribut in jquery -



javascript - How to select elements with second data atribut in jquery -

i got html

<td data-id="1 2 3"></td> <td data-id="1 2 3"></td> <td data-id="1 1 3"></td> <td data-id="3 3 3"></td>

and want select elements sec info id eaquel 2... how write selector?

wado's answer specific case, if want more generic one, can utilize filter :

$('td').filter(function(){ homecoming $(this).data('id').match(/^\d+ 2 /); })

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 -