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

android - questions about switching from C2DM to GCM -

c++ - Qt setGeometry: Unable to set geometry -

batch file - How to extract all multi-volume RAR archives from subfolders of a folder? -