Posts

Showing posts from December 3, 2018

Passing a paginated listing info from one page to another

Image
up vote 1 down vote favorite Within a Bootstrap 4 card, I have a table listing books with 3 columns, of which the first contains a checkbox for each book. The count of the books selected by the user is displayed in the card's footer. var countChecked = function() { var $checkBox = $(this), $checkContainer = $checkBox.closest('table'), $checkedBoxes = $checkContainer.find('input[type=checkbox]:checked'), checkedCount = $checkedBoxes.length; $("#books_count").text(checkedCount); }; $("#books").find("input[type='checkbox']").on('change', countChecked); <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css"> <script src="https://ajax.googleapi