How to remove scroll for anchor tag hash click in javascript or jquery

admin

Administrator
Staff member
I am using wordpress visual composer tabs in my wordpress theme, I am also using same tab menus in Wordpress main menu with hastags like #mylink. When I click on that anchor tag in menu I given page reload option. But before page reload it is scrolling down for it's related content of that tab content.
Here is the code that I am using

Code:
$('.sub-menu .menu-item a').click(function(e) {
     location = this.href;
      location.reload(true);

    });

I want to remove the scroll when you click on the the hashed anchor tag.

for reference URL: <a href="http://wtastudios.com/novus2/projectsservices/#solar_Rooftops" rel="nofollow">http://wtastudios.com/novus2/projectsservices/#solar_Rooftops</a>