I use e.preventDefault();
to disable default anchor behaviour.
Is there a way to prevent only jump action to a target on click?
I tried:
var hash = window.location.hash;
var link = $('a');
$('a').click(function() {
e.preventDefault();
hash = "#"+link.attr("href");
});
But it doesn't work: http://jsfiddle.net/ynts/LgcmB/.