Checkbox change event not firing on unselect #1328

garyns opened this Issue Apr 1, 2011 · 10 comments


None yet

7 participants

garyns commented Apr 1, 2011

I have noticed that checkboxes are only firing a change event when selected (ticked) and not when unselected.

For the below the change alert "Changed" is only shown when the checkbox is pressed to select.

  $(function() {
    $("#myCheckBox").change(function() {

<div data-role="page" id="MyPage">
  <div data-role="content">
    <input type="checkbox" id="myCheckBox" name="myCheckBox">
    <label for="myCheckBox">Test</label>

Just posted your code into a JSBin to test it and it seems to fire the alert on both scenarios on Chrome. Is this happening only on a specific device?


Seems to be only with A4. Works fine with A3.

garyns commented Apr 1, 2011

I get the problem with the current repository code on iPad and chrome.

cmsfruit commented Apr 5, 2011

I'm also experiencing this issue with JQM a4 on iPhone simulator. Here is what my checkbox element looks like

<input type="checkbox" name="my_checkbox" onchange="javascript: doSomething();" />

it never fires the custom onchange event.

dimio85 commented Apr 5, 2011

I think the source of the problem is commented here:


I hope it helps.


fixed scoping issue that was causing the checkbox check to fail, tests to follow Closed by 141127b

@johnbender johnbender closed this Apr 6, 2011

@johnbender Your fix did not worked

garyns commented Apr 7, 2011

I can confirm that the fix works in the current repository code.



Can you post some more information so I can take a look?


Oh, sorry I should have replied soon, any way that worked correctly. I was missing one statement,

Nice work thanks again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment