Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

Prevent anchor tag to move to up when we click on it

$('a').click(function (e) {
    var x = window.pageXOffset,
        y = window.pageYOffset;
    $(window).one('scroll', function () {
        window.scrollTo(x, y);
    })
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Prevent #anchor #tag #move #click
ADD COMMENT
Topic
Name
2+6 =