Showing posts with label Post slider and dynamic sidebar. Show all posts
Showing posts with label Post slider and dynamic sidebar. Show all posts

Sunday, April 28, 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

    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

    Sunday, April 14, 2013

    [Help Wordpress] Post slider and dynamic sidebar


    Hi,


    i use Royal Slider to navigate between posts. For certain posts I want to display custom menus as widgets in a sidebar.


    Usually this can be done with "widget logic" or "dynamic widgets" plugin (e.g. specifying the id of a certain post, custom field etc.). When enabling Royal Slider it doesn't work anymore. Any ideas on how to achieve this?


    Thanks a lot!



    .

    help.dimsemenov.com

    Search

    Other post