クリック時に mouseenter と mouseleave を切り替える次の関数があります。
var flag = true;
$('.aaa').mouseenter(function () {
if(flag) {
$(this).css('background', '#aaaaaa');
}
$(this).css('border', 'solid 1px red');
});
$('.aaa').mouseleave(function () {
if(flag) {
$(this).css('background','blue');
}
$(this).css('border', 'solid transparent 1px');
});
$('#tog').click(function () {
flag = !flag;
});
選択した設定をどのように「記憶」し、次のページ読み込み時に読み込むことができますか?
編集: 以下の解決策が何らかの理由でサイトで機能しない場合は、ここに配置してください:
(function($){
$(document).ready(function(){
//Scripts go in here!
});
})(jQuery);