Hi there, when using checkbox I’m getting several problems, the basic is that some events only fire once…
Let’s see those examples:
CASE A
[CODE]
$(‘#rss’).click(function()
{
alert(‘Clicked!’);
if($(‘#ckb’).attr(“checked”))
{
$(‘#desc’).show();
}
else
{
$(‘#desc’).hide();
}
});
In this case, the alert will be fired as many times as the checkbox is clicked but the $(‘#desc’) only shows and hides once…
CASE B
[CODE]
$(‘#ckb’).toggle(
function()
{
$(‘#desc’).show();
},
function()
{
$(‘#desc’).hide();
}
);
In this case, the hide / show will only be fired once but there’s something else: the checkbox will never be visually checked so it will stay empty and probably returning no value when sending the form…
Any ideas??