Closed cartouche699 closed 11 years ago
Hello,
Do you know how is it possible to check s checkbox with jquery?
I tried a lot of things : attr("checked", "checked");
But it add tje attribute to the input not to the span.
Can you help me?
You have to trigger the actual event for it to work:
$('#checkbox').trigger('click');
If you need to specify if it's checked or not:
$('#checkbox').prop('checked', true).trigger('change');
Hello,
Do you know how is it possible to check s checkbox with jquery?
I tried a lot of things : attr("checked", "checked");
But it add tje attribute to the input not to the span.
Can you help me?