0
上午想方設法保住了jQuery的切換狀態,我無法設置Cookie爲我不使用.toggle()
努力保護切換狀態與JS
我的代碼
jQuery(document).ready(function($) {
$("#switch").click(function(event){
if ($("#navbar").css("display")=='block') {
$("#navbar").hide('fast');
$(this).removeClass('close').addClass('open');
$(this).children().children().html('+');
} else {
$("#navbar").show('fast');
$(this).removeClass('open').addClass('close');
$(this).children().children().html('-');
}
});
});
謝謝你,但切換狀態時不會保留刷新 – 2013-03-17 17:53:57