Wordpress plugin: ajaxStart conflict in Post page (autosave)

Posted by tsiger on Stack Overflow See other posts from Stack Overflow or by tsiger
Published on 2010-04-25T19:15:01Z Indexed on 2010/04/25 19:23 UTC
Read the original article Hit count: 274

Filed under:
|
|

I am developing a small plugin which appears in the post page and it has a touch of Ajax.

    $("#some-div").ajaxStart(function(){
     $(this).html('Loading...');
    });

    $.post(
        AjaxHandler.ajaxurl,
        { action : 'wt4-cats',  },
        function(response) {                
    //do some stuff
   });

thing is that Wordpress triggers the autosave feature every few minutes or so and affects my ajaxStart call. I mean, on autosave the "some-div" html becomes "Loading...". Is possible to avoid that?

© Stack Overflow or respective owner

Related posts about Wordpress

Related posts about AJAX