Steve
Steve

Reputation: 2588

input (checkbox) not working in IE8 when configured with :checked

For my checkbox (following), I used the JQuery condition (:checked) to check if the checkbox is clicked on. It works fine in all the browsers but just doesn't work in IE8. Any idea or assistance?

<input type="checkbox" id="chbx" name="samechbx" onchange="checkbox_changed(this)" />

JS

function checkbox_changed(el) {

        if ($('#chbx').is(":checked")) {
            //if checked, move in.
        }
}

Upvotes: 1

Views: 2095

Answers (1)

Fuzzzzel
Fuzzzzel

Reputation: 1773

This older post explains, that in IE8 and older the change and onchange event is only executed on submit. This means you should go with the onclick event and should be fine:

Jquery check box change function not working in IE 8

Upvotes: 2

Related Questions