Save
This commit is contained in:
29
layout/js/main.js
Normal file
29
layout/js/main.js
Normal file
@@ -0,0 +1,29 @@
|
||||
$(document).ready(function() {
|
||||
var hashValue = window.location.hash.substring(1);
|
||||
|
||||
if (hashValue) {
|
||||
var hashText = hashValue.toUpperCase();
|
||||
|
||||
|
||||
setTimeout(function() {
|
||||
var $tabsBlock = $('ul.nav.nav-tabs[role="tablist"]');
|
||||
|
||||
if ($tabsBlock.length) {
|
||||
$tabsBlock.find('li a').each(function() {
|
||||
var tabText = $(this).text().trim().toUpperCase();
|
||||
if (tabText === hashText) {
|
||||
$(this).trigger('click');
|
||||
|
||||
setTimeout(function() {
|
||||
$('html, body').animate({
|
||||
scrollTop: $tabsBlock.offset().top - 150
|
||||
}, 600);
|
||||
}, 1000);
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user