javascript - How to collect all data attributes and push to an array -


i have series of table rows data attributes. collect value of these data attributes , add them array. how do this?

<tr data-title-id="3706" role="row" class="odd"></tr> <tr data-title-id="3707" role="row" class="odd"></tr> 

or simplest method create array , fill in 1 step:

var dataids = $("table tbody tr").map(function() { return $(this).data('title-id'); });


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -