Keeping the screen static when clicking a link

Hi, I was wondering if anyone knows how to keep the screen in a static position with jquery when a link that has a "#" href is clicked?

Hi,

Phil

+3
source share
2 answers

 

$('a').click(function(e) {
    e.preventDefault();
    // OR:
    return false;
});
+6
source

Add

return false;
+2
source

Source: https://habr.com/ru/post/1734578/


All Articles