Other jQuery Code not working after comment is posted
-
Hi! Your plugin is amazing. I really want to use your plugin, but I’m having a problem with other jQuery code. Please help.
At the bottom of the page, I made a simple button for scrolling back to the top of the page.
After loading the page, my button works fine.
However, after posting a new comment, my button would no longer work. I can click the button but the page won’t scroll anymore.
The comment is successfully posted and the commenting system continues to work well, but my button becomes non-functional.At the bottom of the page, i have this markup:
<input id="asr-bottom-button-to-page-top" type="submit" value="Go to Top">
In my custom js file, I have this code:
jQuery(document).ready(function(){ jQuery("#asr-bottom-button-to-page-top").click(function(){ jQuery('html, body').animate({scrollTop:0}); }); });
In my child theme’s functions.php file, I have this code:
if (!is_admin()) add_action("wp_enqueue_scripts", "my_jquery_enqueue", 11); function my_jquery_enqueue() { wp_enqueue_script( 'pcritic', get_stylesheet_directory_uri() . '/js/pcritic.js' ); }
==========
https://wordpress.org/plugins/wp-ajaxify-comments/
- The topic ‘Other jQuery Code not working after comment is posted’ is closed to new replies.