Forums Forums Search & Filter Pro Check a checkbox with jQuery

Viewing 4 posts - 1 through 4 (of 4 total)
  • Anonymous
    #21606

    Hi,

    can you help me with a script to check/tick a checkbox with jQuery. I’m not checking it with $(‘.myCheckbox’).prop(‘checked’, true);

    It does tick the checkbox but unfortunately does not “submit” the checked value and show the results. tnx

    Ross Moderator
    #21607

    Hmmm that should work, maybe I’m not using prop in S&F (which I know is the right way).

    Try adding $(‘.myCheckbox’).prop(‘checked’, 'checked');

    Thanks

    Anonymous
    #21609

    Tnx for the quick reply, I appreciate that.

    i was probably not clear. The checkbox is checked now but the form is not updated with the results. When i hit the submit button, the results are fine. However, I would like to see the results immediately like any other checkboxes/input fields.

    I’ve tried the following:

    (“input[value=’myCheckbox’]”).prop(‘checked’, ‘checked’);
    $(‘input[type=submit]’).click();

    but the the value of the submit is not reflected in the results. It looks like only the submit is processed.

    Anonymous
    #21632

    Just wanted to let you know that the problems has fixed. It was similar as

    tnx, your forum has been a great help to customize the filter.

Viewing 4 posts - 1 through 4 (of 4 total)