Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>There should be no problem using <code>is(":checked")</code> and <code>$.change</code> in IE9 since both are supported by jQuery version that you are using (and I think working on any version for this matter).</p> <p>Since you did not provide the HTML structure you used, I created some assumptions based on the scripts in EDIT(2).</p> <ol> <li>There are several checkboxes each with the class <code>consumer-communication-checkbox</code></li> <li>Each of these checkboxes are wrapped in a parent element. (I used <code>div</code> for my sample).</li> <li>You are trying to bind change events on these checkboxes (either <code>isChildAvail</code> is true or false) but ONLY IF the parent container has a text containing "hugg".</li> <li>You also want to do a logic for checkboxes that are checked when document loaded correctly and ready.</li> </ol> <p>With those assumptions, I created simple code similar to yours: <a href="http://jsfiddle.net/9FtjU/3/" rel="nofollow">http://jsfiddle.net/9FtjU/3/</a></p> <p>The HTML is coded based on my 1st and 2nd assumptions above. The JavaScript is just a simplified version of yours. In the script, I introduced the variable <code>isChildAvail</code>; you can vary the value of it replicate different results.</p> <p>The issue could be that you were binding <code>change</code> event to all chekboxes.</p> <p>I further simplified it (using my 3rd and 4th assumptions) to separate the change event from the iteration: <a href="http://jsfiddle.net/ub7kS/1/" rel="nofollow">http://jsfiddle.net/ub7kS/1/</a></p> <p>I tested both jsfiddle links I provided above and both works in IE9.</p> <p>===</p> <p>On another issue, you might also want to check your click event handler for <code>$('.editdiv a')</code></p> <p><strong>UPDATE</strong></p> <p>I edited the two jsfiddle links above. This one's similar to your script: <a href="http://jsfiddle.net/hunLQ/" rel="nofollow">http://jsfiddle.net/hunLQ/</a> And this is the one with separated change event handler and iteration: <a href="http://jsfiddle.net/hunLQ/1/" rel="nofollow">http://jsfiddle.net/hunLQ/1/</a></p> <p>Feel free to modify and use either as guide. Just change the <code>alert</code> with your logic.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload