[jQuery] Cookies
[jQuery] Cookies
I'm really stuck in adding the cookies plugin to the sortables script
I have below. I don't even know where to begin. Can anyone help?
<script type="text/javascript">
$(document).ready(function(){
$(".column").sortable({
connectWith: '.column',
cursor: 'hand',
handle: 'h3',
opacity: 0.8,
change: function(e, i) {
// Post data back to server or update cookie
}
});
$(".widget").append('<div class="close"></div>');
$(".close").click(function(){
if ($(this).parent().data("collapsed")=="yes") {
$(this).parent().data("collapsed","no");
$(this).parent().animate({height:$(this).parent().data
("height")});
} else {
$(this).parent().data("height",$(this).parent().height());
$(this).parent().data("collapsed","yes");
$(this).parent().animate({height:30});
}
});
});
</script>
Many thanks in advance.
Craig