Possible Duplicate:
Stop default hashtag behavior with jquery
I have some jquery code on a link that loads a DIV into the page using .load(), it also adds a hashtag to the url for pagination / bookmarking purposes; what i want to do is to stop the page from jumping to the div when the link is clicked.
$('#jqNav li a').click(function(){
if($(this).parent().is(".nav1")){ $('.landing .main .nav ul').css({ "background-position" : "0 -50px" });}
else if($(this).parent().is(".nav2")) { $('.landing .main .nav ul').css({ "background-position" : "0 -100px" });}
else if($(this).parent().is(".nav3")) { $('.landing .main .nav ul').css({ "background-position" : "0 -150px" });}
else if($(this).parent().is(".nav4")) { $('.landing .main .nav ul').css({ "background-position" : "0 -200px" });};
stopAnim = true;
$page = $(this).attr('href');
var $hashTag = $(this).attr('name');
window.location = "#" + $hashTag;
loadData();
e.preventdefault();
return false;
});