|
|
|
@ -7,7 +7,6 @@ function createTabs() { |
|
|
|
// We create the list
|
|
|
|
var html = ''; |
|
|
|
for (var i=0; i<tabs.length; i++){ |
|
|
|
//if(document.URL.search(tabs[i].id)>-1)
|
|
|
|
if(window.location.hash == '#'+tabs[i].id) |
|
|
|
current = tabs[i].id; |
|
|
|
|
|
|
|
@ -16,7 +15,6 @@ function createTabs() { |
|
|
|
html += '</li>'; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// We show the first tab
|
|
|
|
tabs[0].style.display = "block"; |
|
|
|
|
|
|
|
@ -61,7 +59,9 @@ function changeTab(current, n){ |
|
|
|
// We show the selected div
|
|
|
|
var tabOn = document.querySelector('#'+n); |
|
|
|
tabOn.style.display = "block"; |
|
|
|
window.location.hash = n; |
|
|
|
|
|
|
|
var baseUrl = window.location.href.split('#')[0]; |
|
|
|
window.location.replace(baseUrl + '#' + n); |
|
|
|
|
|
|
|
scroll(0,0); |
|
|
|
} |
|
|
|
|