20 September

How to avoid be moved to the top of the page. . .

: 0 Comments

Adding the code below  in   custom.js   or other   .js   file, you can modify the   a href=”#” a javascript:void();  ,so when you click on a link, you will NOT be moved to the top of the page:

jQuery(‘a’).each(function(){
src=jQuery(this).attr(‘href’);
if (src==’#') jQuery(this).attr(‘href’,'javascript:void(0)’);
});

Back to Top