var header = document.getElementById('header');
var headerLinks = header.getElementsByTagName('a');
for(var i = 0, l = headerLinks.length; i < l; i++)
{
headerLinks[i].onclick = function() {
var href = this.href;
//Load the AJAX page (this is a whole other topic)
loadPage(href);
//Update the address bar to make it look like you were redirected
location.hash = '#' + href;
//Unfocus the link to make it look like you were redirected
this.blur();
//Prevent the natural HTTP redirect
return false;
}}
CSS:
#Footer {
font-size:xx-small;
text-align:left;
width:100%;
bottom:0px;
position:fixed;
left:0px;
background-color: #CCCCCC;
border-top: 1px solid #999999;
padding:4px;
padding-right:20px;
color:#666666;
}
I have done so
this code not worked, i want to do not refresh area for music player like google videos or facebook task bar
I have done so
function links() {
//var header = document.getElementById("header");
var headerLinks = document.getElementsByTagName("a");
for (var i = 0, l = headerLinks.length; i < l; i++) {
headerLinks[i].onclick = function() {
var href = this.href;
loadPage(href);
window.location.hash = "#" + href;
this.blur();
return false;
}
}
}
window.onload = function() {
links();
}
i whant to all links to modify but it's not worked