Possible Duplicate:
Click Toggle with jQuery
i tried 1 hour to toggle a checkbox. tried everything but i cant get this to work.
$('#edit-customer-profile-shipping .fieldset-title').click(function() {
if ($('#edit-customer-profile-shipping input.toggler').is(':checked')) {
$('#edit-customer-profile-shipping input.toggler').attr('checked', false);
} else {
$('#edit-customer-profile-shipping input.toggler').attr('checked', true);
};
});
Could anyone help me out please??