original
It depends on what the hash value does. If it just moves the document to #a1 , you just need to set scrollTop to 0 after loading the document.
change
looking at other stackoverflow questions,
parent.location.hash = ''
should do it, but maybe reloads the page (you should test it)
Other than that, I advise you to handle it during / before your AJAX calls, i.e.
if (hash != 'a1'){ doAjax(); } //pseudocode obviously.
change 2 with code based on published code
Or, if you just need to invoke AJAX using a url without a hash, can you delete it in a line that calls jQuery, no?
var $tabValue = $(this).attr('href'); var $withoutHash = $tabValue.substr(0,$tabValue.indexOf('#'));
basically we get a href before the first #
Adam Kiss Mar 05 '10 at 10:12 2010-03-05 10:12
source share