widget wont hide

  • Unknown's avatar

    I made an update to my widget and now the script wont auto hide my menu. I know its in the script but not sure how to fix it

    $(function(){

    $(document).ready(function()
    {
    $(‘#featuredProductsDiv’).children(‘ul’).delay(800).slideToggle(600);
    console.log(‘tried to hide the links’);
    });

    $(‘.featuredProductHeader’)
    .hover(function(){
    $(this).css({‘color’:’#77A4D1′,’text-decoration’:’underline’,’cursor’:’pointer’});
    })
    .mouseout(function(){
    $(this).css({‘color’:’#FFF’,’text-decoration’:’none’,’cursor’:’auto’});
    });

    $(‘.featuredProductHeader’).click(function(){
    var itemsToShow = ‘.’ + this.id;
    console.log(‘Clicked: ‘ + itemsToShow);
    $(‘#featuredProductsDiv’).children(‘ul’).not(itemsToShow).slideUp(600);
    $(itemsToShow).slideToggle(600);
    console.log(‘detected click event’);
    });
    });

    Click on a topic to expand and read more

    American Standard

    [catlist class=AmericanStandard name=AmericanStandard thumbnail=no orderby=title order=asc numberposts=-1]

    Brizo

    [catlist class=Brizo name=Brizo thumbnail=no orderby=title order=asc numberposts=-1]

    Elkay Perfect Drain

    [catlist class=Elkay name=Elkay thumbnail=no orderby=title order=asc numberposts=-1]

    Grohe

    [catlist class=Grohe name=Grohe thumbnail=no orderby=title order=asc numberposts=-1]

    Moen

    [catlist class=Moen name=Moen thumbnail=no orderby=title order=asc numberposts=-1]

    Sigma

    [catlist class=Sigma name=Sigma thumbnail=no orderby=title order=asc numberposts=-1]

    Toto

    [catlist class=Toto name=Toto thumbnail=no orderby=title order=asc numberposts=-1]

    The blog I need help with is: (visible only to logged in users)

  • Hello –

    I’ll be happy to help you with this. Due to the shared environment of WordPress.com there are limits on the types of code or script you can use. See here: https://en.support.wordpress.com/code/

    By clicking on Widgets > Visibility > Hide IF… you’ll be able to control which pages display the widget.

    Here is the reference for instructions: https://en.support.wordpress.com/widgets/#widget-visibility

  • The topic ‘widget wont hide’ is closed to new replies.