Hello I was wondering if anyone might be able to help me?
this is the jquery?I have two problems that I am hoping somone can help me with?
What I am trying to do is when I click on a checkbox (#Facebook) it will display a div #widget-FB, and when I click on the close link (#widget-FB a.close), I can get it to delete.
questions:
1:WHen I check the checkbox, it will set the cookie. The problem that I am having is that I am having is that hwen i click on the close link, I can't get it to delete the cookie. Can someone let me know what I am doing wrong?
2: I am also wondering if you might know how I can have it so that if I uncheck the checkbox or click on the close link the div will disappear.
<script language="javascript">
$(document).ready(function(){
<!--facebook- ->
$('#Facebook:checkbox').click(function(){
$("#widget-FB").show();
$.cookie('Facebook', 'shown2');
});
$('#widget-FB a.close').click(function(){
$("#widget-FB").hide();
$.cookie('Facebook', 'hidden2');
});
var display2 = $.cookie('Facebook');
// Set the user's selection for the left column
if (display2 == 'shown2') {
$("#widget-FB").show();
};
// Set the user's selection for the right column
if (display2 == 'hidden2') {
$("#widget-FB").hide();
};
});
</script>
thanks,
Aaron