views:

15

answers:

1

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?

A: 

1) Open your wp-admin/post.php file and wp-admin/post-new.php files. 2) You will find this line of code there:

wp_enqueue_script('autosave');

3) Add // to the beginning of this code.

The autosave option will be disabled for your existing and new posts.

jini
... without breaking the autosave functionality apparently
tsiger
hmmmm not sure about that! Sorry !
jini