Created
August 17, 2023 04:18
-
-
Save rajucs/0cfde6552ce8ae6d463aea2c0830ee57 to your computer and use it in GitHub Desktop.
Revisions
-
rajucs created this gist
Aug 17, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ // Perform your Ajax call here $.ajax({ // ... your Ajax settings ... success: function(response) { // After the Ajax call is successful and content is loaded // Scroll to the target div with animation $("html, body").animate( { scrollTop: $("#wps-comment-list").offset().top - 50 }, 2000 // Animation duration in milliseconds ); }, error: function(error) { // Handle Ajax error console.error("Ajax call error:", error); } });