WP Ajaxify Comments
[resolved] I need an onUnblock callback (3 posts)

  1. kisshomaru
    Posted 2 years ago #

    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() {
    				// 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...


  2. kisshomaru
    Posted 2 years ago #

    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?

  3. kisshomaru
    Posted 2 years ago #

    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...

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Ajaxify Comments
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.