diff --git a/themes/bootstrap3/js/record.js b/themes/bootstrap3/js/record.js index b2cadcefee2a00d02ae14001d2ec43a35913714f..47d0251b36688c005dd0fbea1b040bef6a4aabb4 100644 --- a/themes/bootstrap3/js/record.js +++ b/themes/bootstrap3/js/record.js @@ -222,6 +222,18 @@ function ajaxTagUpdate(tag, remove) { }); } +function applyRecordTabHash() +{ + // Open tag in url hash + if ($(window.location.hash.toLowerCase()).length > 0) { + $(window.location.hash.toLowerCase()).click(); + } +} + +$(window).bind('hashchange', function(){ + applyRecordTabHash(); +}); + $(document).ready(function(){ var id = $('.hiddenId')[0].value; registerTabEvents(); @@ -244,10 +256,7 @@ $(document).ready(function(){ return ajaxLoadTab(tabid); } }); - // Open tag in url hash - if ($(window.location.hash.toLowerCase()).length > 0) { - $(window.location.hash.toLowerCase()).click(); - } + applyRecordTabHash(); /* --- LIGHTBOX --- */ // Cite lightbox