jQuery toggle cookie function
I have simple toggle (button switch) function here, but I don’t know how to add cookie and how to remember position when users clicks on button.
Anyone can help me to add cookie here ?
HTML Code:
$(document).ready(function(){
$("a.switch_thumb").toggle(function(){
$(this).addClass("swap");
$("ul.display").fadeOut(100, function() {
$(this).fadeIn(100).addClass("thumb_view");
});
},
function () {
$(this).removeClass("swap");
$("ul.display").fadeOut(100, function() {
$(this).fadeIn(110).removeClass("thumb_view");
});
});
});
Im read about jqury cookie plugin but i have no idea how to implementing here…
View full post on Tycoon Talk
cookie, function, jquery, Toggle