I have a form, and I want automatically to update it when I click on a checkbox.
This is my current code:
$('.option img').click(function() {
$("#views-exposed-form-Portfolio-page-1").submit();
});
However, the selected checkbox is not stored before the form is submitted, and so the selection has not effect.
thanks
You can obviously check and see if the checkbox is checked before submitting the form, but this way is easier than submitting based on the click event (which fires before the change event, it seems).