mirror of
https://github.com/JangoSteve/jQuery-EasyTabs.git
synced 2026-06-10 15:37:02 +02:00
Use history API fallback to location hash
this prevents the browser from jumping to the anchor identified by the hash
This commit is contained in:
@@ -538,7 +538,12 @@
|
||||
if ( settings.updateHash && ! skipUpdateToHash ) {
|
||||
//window.location = url.toString().replace((url.pathname + hash), (url.pathname + $clicked.attr("href")));
|
||||
// Not sure why this behaves so differently, but it's more straight forward and seems to have less side-effects
|
||||
window.location.hash = '#' + $targetPanel.attr('id');
|
||||
if (window.history.pushState) {
|
||||
window.history.pushState(null, null, '#' + $targetPanel.attr('id'));
|
||||
}
|
||||
else {
|
||||
window.location.hash = '#' + $targetPanel.attr('id');
|
||||
}
|
||||
} else {
|
||||
skipUpdateToHash = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user