Code komt uit tutorial Drag & drop webdesigner 21
Goede tutorial, alleen niet bruikbaar omdat er niet wordt uitgelegd hoe een cookie in te stellen. Heb mij suf gezocht op internet maar niets kunnen vinden.
Heeft iemand een idee?
Zie code:
<script src="scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="scripts/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".column").sortable({
connectWith: '.column',
cursor: 'hand',
handle: 'h3',
opacity: 0.2,
change: function(e, i) {
setCookie // 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().he ight());
$(this).parent().data("collapsed","yes");
$(this).parent().animate({height:30});
}
});
});
</script>
Goede tutorial, alleen niet bruikbaar omdat er niet wordt uitgelegd hoe een cookie in te stellen. Heb mij suf gezocht op internet maar niets kunnen vinden.
Heeft iemand een idee?
Zie code:
<script src="scripts/jquery-1.3.2.min.js" type="text/javascript"></script>
<script src="scripts/jquery-ui-1.7.2.custom.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
$(".column").sortable({
connectWith: '.column',
cursor: 'hand',
handle: 'h3',
opacity: 0.2,
change: function(e, i) {
setCookie // 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().he ight());
$(this).parent().data("collapsed","yes");
$(this).parent().animate({height:30});
}
});
});
</script>