michael2
9/11/2017 - 12:37 AM

This will take 'sub-menu' items and put them in the #outersidebar. If there is no 'sub-menu' items it will hide the #outersidebar (no CSS s

This will take 'sub-menu' items and put them in the #outersidebar. If there is no 'sub-menu' items it will hide the #outersidebar (no CSS styling)

<script>
$(window).bind("load", function(){
  $( "#menu .parent.current ul" ).clone().prependTo( "#outerSidebar" );
    //if length > 0 it means that element is on the page
    if($("#outerSidebar li").length < 1){
        $("#outerSidebar").hide();
    }
});
</script>