I decided to include some js to frequently check for hashchanges in the url and add or delete a list of links in the sidebar. When testing it locally in simple html it works fine. Uploaded to the server (http://lrvkoeln.de/Tests/LRV/) nothing happens.
Can you please give me a hint why?
This is the js-file I included in the head of my header.php:
var hash = false;
checkHash();
function checkHash(){
if(window.location.hash != hash) {
hash = window.location.hash;
processHash(hash);
} t=setTimeout("checkHash()",400);
}
function processHash(hash){
if (window.location.hash == "#page-1") {
$("#textwidget ul").empty();
}
if (window.location.hash == "#page-2") {
$('#textwidget ul').html('Geschichte Vorstand Anlage Mitglied werden ');
}
if (window.location.hash == "#page-3") {
$("#textwidget ul").empty();
}
if (window.location.hash == "#page-4") {
$("#textwidget ul").html('Musi Center Manga Center ');
}
if (window.location.hash == "#page-5") {
$("#textwidget ul").html('Multivitamin Center Mutti Center ');
}
if (window.location.hash == "#page-6") {
$("#textwidget ul").empty();
}
if (window.location.hash == "#page-7") {
$("#textwidget ul").empty();
}
if (window.location.hash == "#page-8") {
$("#textwidget ul").empty();
}
}
.
help.dimsemenov.com
No comments:
Post a Comment