I am having trouble getting an event to trigger when clicking on a button in the JQuery Bootgrid pagination element. I believe I am not able to target the element correctly for the handler to know I have clicked on the pagination. I have tried the following variations and more:
$(document).on('click', "#grid-footer .button", function () {
alert("You clicked the pagination button!");
});
$(document).on('click', "#grid-footer a", function () {
alert("You clicked the pagination button!");
})
$(document).on('click', "#grid-footer a .button", function () {
alert("You clicked the pagination button!");
})
$(document).on('click', "#grid-footer .pagination", function () {
alert("You clicked the pagination button!");
})
$(document).on('click', "#grid-footer .pagination > li > a", function () {
alert("You clicked the pagination button!");
})
None of these trigger the alert when clicking on a pagination button. Can anyone figure out the correct selector to trigger an event when clicking on the pagination? Here is a jsfiddle with the most simple possible bootgrid and a pagination element.