[jQuery] Checkbox behaviour
Hi,
This is my first little foray into JQuery, so far i'm impressed,
having had very little JS experience, I was able to create the result
I wanted very qucikly and easily!
However, I'm having one little niggle...
Here's my code:
[code]
$(document).ready(function(){
$(".submit_problem_form_right").css("visibility","hidden");
$("#left_submit").css("visibility","visible");
$("#show_resolve").click(function () {
if ($("#show_resolve").is(":checked"))
{
$(".submit_problem_form_right").css("visibility","visible");
$("#left_submit").css("visibility","hidden");
}
else
{
$(".submit_problem_form_right").css("visibility","hidden");
$("#left_submit").css("visibility","visible");
}
});
});
[/code]
This works fine.. ticking the checkbox shows and hides the div.
However, if I check the checkbox and refresh the page, the checkbox
remains ticked, but the div is hidden.
Any ideas how I can make it work reliably?