Support » Plugin: WP Ajaxify Comments » Don't want to scroll, and tell me how to use 'OnAfterUpdateComments' callback

  • Resolved


    Hi 🙂

    This is amazing plugin.Thank you for making this.

    My site has two comment forms per one singlepage.
    So, I changed the value for “Comment form selector” to “#commentform , “#tkform(this is commentform no.2)”.

    It works both.

    But, I want to not scroll to commenthash when use commentform no.2.
    Because the position of #tkform is sticking rightside.
    How do I that? I tried fix scroll section in source, but it didn’t work.

    AND, I made script for appending comment into my main of blog-sentents.
    I want to reflesh my script with ajax after people post comment.
    I dont know how to use ‘OnAfterUpdateComments’ callback.Can this do like that I want?
    Please, Show me the example using ‘OnAfterUpdateComments’ callback.
    Can I use for ‘OnAfterUpdateComments’ to “my_function();” in function.php?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author janjonas



    thanks for your comment.

    Unfortunately there is no easy way to disable the scrolling functionality. Maybe I will add an option in a feature release. What you can do is to remove the id-attributes of the comment elements (by editing your theme). In result, the plugin will not find the comment elements which disables the scrolling functionality.

    The OnAfterUpdateComments is a client-side event, i.e. you can define some JavaScript code that should be executed. To call a server-side php function you need to make an AJAX call in the OnAfterUpdateComments that executes some server-side code and here you can call your my_function(); method.

    Hope this helps…

    Plugin Author janjonas


    Unfortunately, I did not get any feedback. Please feel free to reopen the thread if you need further assistance…

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Don't want to scroll, and tell me how to use 'OnAfterUpdateComments' callback’ is closed to new replies.