You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
cosmopet.ae/wp-content/themes/woodmart22/js/scripts/wc/woocommerceComments.js

25 lines
678 B

/* global woodmart_settings */
(function($) {
woodmartThemeModule.woocommerceComments = function() {
var hash = window.location.hash;
var url = window.location.href;
if (hash.toLowerCase().indexOf('comment-') >= 0 || hash === '#reviews' || hash === '#tab-reviews' || url.indexOf('comment-page-') > 0 || url.indexOf('cpage=') > 0) {
setTimeout(function() {
window.scrollTo(0, 0);
}, 1);
setTimeout(function() {
if ($(hash).length > 0) {
$('html, body').stop().animate({
scrollTop: $(hash).offset().top - 100
}, 400);
}
}, 10);
}
};
$(document).ready(function() {
woodmartThemeModule.woocommerceComments();
});
})(jQuery);