27 lines
744 B
HTML
27 lines
744 B
HTML
![]() |
<script>
|
||
|
$(document).ready(function()
|
||
|
{
|
||
|
|
||
|
$('.nav-sub-menu').each(function(){
|
||
|
var ref = $(this).attr('ref');
|
||
|
|
||
|
var cookie = $.cookie('menu-'+ref);
|
||
|
|
||
|
if(cookie!='show')
|
||
|
$(this).hide();
|
||
|
})
|
||
|
|
||
|
$('.nav-header').bind('click',function(){
|
||
|
|
||
|
var ref = $(this).attr('ref');
|
||
|
var obj = $('.nav-sub-menu[ref='+ref+']');
|
||
|
|
||
|
if(obj.css('display')=='none')
|
||
|
$.cookie('menu-'+ref,'show');
|
||
|
else
|
||
|
$.cookie('menu-'+ref,'hide');
|
||
|
|
||
|
obj.slideToggle('normal');
|
||
|
});
|
||
|
})
|
||
|
</script>
|