Skip to content Skip to sidebar Skip to footer

Tablesorter Functionality Not Working After Jquery Ajax Call?

In document ready() function i am binding dropdowns and calling dropdowns chagefunction() and binding table results.But tablesorter() not working after that ajax call.,please let m

Solution 1:

Try .on()

As elements are added dynamically which don't have tablesorter() binded to them .So you have to use Event Delegation.

Syntax

$( elements ).on( events, selector, data, handler );

Solution 2:

the problem is the change function is not applied for ajax load scripts. so instead of $(".dropdownclass").change(function(){ use:

// attach a delegated event to document
$(document).on("change",".dropdownclass", function(){

Solution 3:

try this, that is not working because your control is not yet created and you are trying to attach a event, if you use on event it will work fine.

$(document).ready(funciton(){
$(document).on('change', '#dropdown', function (evt) {
    alert($(this).val());
});
});

Post a Comment for "Tablesorter Functionality Not Working After Jquery Ajax Call?"