• Resolved Bloke

    (@bloke)


    I found this code on line to make the navigation in the margin to expand and collapse. I need a way to set a cookie to keep the menu open when the page refreshes. Anyone know how to do this?

    (function($) {
    
    	$(document).ready(function() {
    
    		$(".wpsc_top_level_categories > li:has(li)").prepend("<span class=\"CatExpander\">+</span>");
    		$(".wpsc_top_level_categories").css( 'cursor', 'pointer' );
    
    		$(".CatExpander").toggle(function() {
    
    			$(this).html( '-' );
    
    			}, function() {
    
    			$(this).html( '+' );
    
    		});
    
    			$(".wpsc_top_level_categories li a").click(function() {
    
    			$(this).toggleClass("CatExpanded").siblings(".CatExpander").toggle();//toggles the +
    			$(this).toggleClass("CatExpanded").siblings("ul").slideToggle(500);
    
    		}).eq(500).addClass("CatExpanded").end().slice(0).siblings("ul").hide(); 
    
    $(".wpsc_top_level_categories > li:has(li)").hover(function () {
         $(this).children("a").click(function () {
            return false;
         });
      });
    
    	});
    
    })(jQuery);

    https://wordpress.org/plugins/wp-e-commerce/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Expanding navigation keep open on page refresh’ is closed to new replies.