I\'m using bootstrap table. In that I want to get Item ID value/values of selected table rows after clicking \'Add to cart\' button present on same
Item ID
\'Add to cart\'
Here is example give it to you :
HTML
Item ID 5 15 10 Add to cart
JS
var arr; $('button').click(function(){ arr = $('#table-style').find('[type="checkbox"]:checked').map(function(){ return $(this).closest('tr').find('td:nth-child(2)').text(); }).get(); console.log(arr); });
DEMO