jQuery .on() at ajax success jQuery .on() at ajax success ajax ajax

jQuery .on() at ajax success


You can use .ajaxSuccess()

$(document).ajaxSuccess(function() {// will do something});

or bind to

$(document).on('ajaxSuccess','#elementInsertedByAjax',function(){    // will do something});


You can use the ajax global event jQuery.ajaxSuccess

$(document).ajaxSuccess(function() {    $( ".log" ).text( "Triggered ajaxSuccess handler." );});


$,ajax({  url:'yoururl',  type : 'GET', /*or POST*/  data: {'d1',data1}, /*if any*/  success:function(returndatafromserver){         //here you can check the success of ajax  },error:function(errormsg){   //error if any  }});