I'm trying to prevent the page jump when clicking on a link.
CODE UPDATE
$(document).on("click", "#mapbase" , function(e) {
e.preventDefault();
id = window.location.hash.substring(1);
$('.map_tabs').attr("style", "display:none");
if ( $('.map_tabs#' + id).length ) {
$('.map_tabs#' + id).attr("style", "display:block");
} else {
$('.map_tabs#contact-us').attr("style", "display:block")
$('.map_tabs#contact-us h2').text(id + ' Projects Coming Soon');
}
});
I've tried adding e.preventDefault() but it's not stopping the page jump.