/ Published in: jQuery

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
$("#divid").toggle(function() { $("#divid ul").slideUp("slow"); $.cookie('cookie_name', 'position'); }, function () { $("#divid ul").slideDown("slow"); $.cookie('cookie_name', 'position2'); }); // cookie var cookie_name = $.cookie('cookie_name'); // Set the user's selection for the right column if (cookie_name == 'position') { $("#divid ul").hide(); };
URL: http://www.vagrantradio.com/2009/10/getting-and-setting-cookies-with-jquery.html
Comments
