Saturday, April 27, 2013

[Help Wordpress] Post slider and dynamic sidebar


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

    Search

    Other post

    [Top WP themes 2013] [Mobile] TOUCH - A lighter-than-air WP theme, by Bonfire. (Mobile)
    [Mobile] TOUCH
    [Mobile] TOUCH - A lighter-than-air WP theme, by Bonfire. (Mobile)Back to Home »Mobile »[M...
    [Top WP themes 2013] [Mobile] Resans - Wordpress Mobile and Tablet (Mobile)
    [Mobile] Resans
    [Mobile] Resans - Wordpress Mobile and Tablet (Mobile)Back to Home »Mobile »[Mobile] Resan...
    [Top WP themes 2013] [Mobile] iMenu - Restaurant Tablet and Mobile Retina Menu (Mobile)
    [Mobile] iMenu
    [Mobile] iMenu - Restaurant Tablet and Mobile Retina Menu (Mobile)Back to Home »Mobile »[M...
    [] [Mobile] TOUCH - A lighter-than-air WP theme, by Bonfire. (Mobile)
    [Mobile] TOUCH
    [Mobile] TOUCH - A lighter-than-air WP theme, by Bonfire. (Mobile)Back to Home »Mobile »[M...
    [Top WP themes 2013] [Mobile] BRAVE: Dark, clean, fully responsive. By Bonfire. (Mobile)
    [Mobile] BRAVE: Dark
    About BRAVE Quality paired with support to die forBeautifully dark, minimal and 100% resp...