forum

Home / DeveloperSection / Forums / Will jQuery ajaxStop() make recursive calls ? if so, how to stop it?

Will jQuery ajaxStop() make recursive calls ? if so, how to stop it?

Anonymous User513218-May-2013
Hi Everyone!

I'm showing Ajax login form for various user action in my portal, once successfully login I want to update some div's for that I'm using following code,

 $(document).ajaxStop(function(){

        $.get($(location).attr('href'),function(html){
        var $html = $(html);
        $('#topBar').html($html.find('#topBar'));
        $('#commentsForm').html($html.find('#commentsForm'));
        });
  });
Will above code leads to any recursive Ajax calls ? currently its working as expected but I want to know it clearly.

Update:

I kept log at end of the ajaxStop then it printing log message recursively then it shows clearly that above code making recursive calls.


Updated on 18-May-2013
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By