Reputation: 79
I have accending and descending sort icons for sorting purposes. On the initial loading, sorting is in an enabled condition I am in need of a solution similar to below:
$('.pgggo-container-ajax-sorting').on('click', '.pgggocheckboxdecendinp', function(event) {
say when the descend icon is clicked this function should run. But the above method is not working for a checkbox. Please help
Upvotes: 1
Views: 53
Reputation: 682
You can try this:
$('.pgggo-container-ajax-sorting').on('click', '.pgggocheckboxdecendinp', function(event) {
if($(this).is(':checked')) {
// code for checked condition
}
else {
// code for unchecked condition
}
});
This will work with checkbox.
Upvotes: 1