Hash in url bar is page to load for frames When you click a nav link, it sets the hash If you go to nav link in new tab, and click home, it will load the same page, but in the frames
10 lines
231 B
JavaScript
10 lines
231 B
JavaScript
function goToHash(){
|
|
if(window.location.hash != ""){
|
|
document.getElementById("content-frame").src = window.location.hash.substr(1)
|
|
}
|
|
}
|
|
|
|
function setHash(link){
|
|
window.parent.location.hash = link.getAttribute("newHash")
|
|
}
|