WordPress.org

Support

Support » Plugins and Hacks » WP Ajaxify Comments » [Resolved] I need an onUnblock callback

[Resolved] I need an onUnblock callback

  • I have a jquery plugin that works on the comments area on every page.
    After submitting the comment, the page is not reloaded, so the DOM changes state. After submit, it will block the ui then unblock it for the comments. I looked on their site but can’t find/make it work.
    So I need globally to know when the unblock finished so I can refresh based on the new DOM on the other script at exactly the right time.
    I have it now on timeout to make it work on submit. Something like:

    $('#submit').click(function() {
    			//alert(updatefinsihed);
    			setTimeout(function(){
    				// my code on the comment box and refresh
    					}, 4000);
    
    		});

    Any chance there is a public method to that unblock?
    Another idea is for me to create a hidden someth through javascript on your afterupdatecomments, but I would rather not…

    http://wordpress.org/plugins/wp-ajaxify-comments/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Back to this: is there any way I can know when the page is unblocked so i can run another script at the right time?
    Thanks.

    A well. Solved.
    Added my function directly in the ‘OnAfterUpdateComments’. Something like this works, I just didn’t like the idea of merging stuff (keeping things separate would have been better), and is to expensive to read for a hidden element:
    ‘OnAfterUpdateComments’ callback:

    jQuery(document).ready(function($) {
       // My code.
    });

    I’ll mark it as solved, I just hoe upgrades will leave it be…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] I need an onUnblock callback’ is closed to new replies.
Skip to toolbar