Note that there are some explanatory texts on larger screens.

plurals
  1. POIf this is checked jquery is not working in IE 9?
    primarykey
    data
    text
    <p>Here am using a jquery checkbox click function and if i click a checkbox in IE 9 <code>if ($(this).is(':checked'))</code> it is not throwing the alert message..but it is working in IE 10,firefox and chrome</p> <pre><code>if (isChildAvail == "true") { $(this).change(function() { if ($(this).is(':checked')) { alert("test"); $(this).parent().parent().append('&lt;div id="divedit" class="editdiv"&gt;&lt;p id="p_childlabel" class="childlabel"&gt;Children : ' + ChilAvailCount + ' &lt;/P&gt;&lt;a class="childlabeledit"&gt;Edit&lt;/a&gt;&lt;/div&gt;'); $('.editdiv a').click(function() { $(this).parent().parent().append($("#divchildcontrol")); EditForPullups(); }); } } </code></pre> <p>Any suggestion??</p> <p><strong>EDIT:</strong></p> <pre><code> $(this).change(function() { </code></pre> <p>The issue is with the Change function and not this one <code>if ($(this).is(':checked'))</code></p> <p><strong>EDIT(2):</strong></p> <pre><code>var strCheck = ""; $('.consumer-communication-checkbox').each(function () { strCheck = $(this).parent().text(); if (strCheck.toLowerCase().indexOf("hugg") &gt;= 0) { //scenario without child if (isChildAvail == "false") { jQuery(':checkbox').change(function () { if ($(this).prop('checked') === true) { $(this).parent().parent().append($("#divchildcontrol")); IsChildcontrolwithH = "1"; IsChildcontrolwithG = "0"; IsChildcontrolwithP = "0"; } else { if (IsChildcontrolwithH == "1") { $("#divpersonalrightheader").append($("#divchildcontrol")); } } }); } //scenario with child else { if ($(this).prop('checked') === true) { //Set SubscribedCode SubscribedCode = "H"; $(this).parent().parent().append('&lt;div id="divedit" class="editdiv"&gt;&lt;p id="p_childlabel" class="childlabel"&gt;Children : ' + ChilAvailCount + ' &lt;/P&gt;&lt;a class="childlabeledit"&gt;Edit&lt;/a&gt;&lt;/div&gt;'); $('.editdiv a').click(function () { $(this).parent().parent().append($("#divchildcontrol")); EditForH(); }); } jQuery(':checkbox').change(function () { if ($(this).prop('checked') === true) { $(this).parent().parent().append('&lt;div id="divedit" class="editdiv"&gt;&lt;p id="p_childlabel" class="childlabel"&gt;Children : ' + ChilAvailCount + ' &lt;/P&gt;&lt;a class="childlabeledit"&gt;Edit&lt;/a&gt;&lt;/div&gt;'); $('.editdiv a').click(function () { $(this).parent().parent().append($("#divchildcontrol")); EditForH(); }); } else { $("#divedit").remove(); if (IsChildcontrolwithH == "1") { $("#divpersonalrightheader").append($("#divchildcontrol")); IsChildcontrolwithH = "0"; IsChildcontrolwithG = "0"; IsChildcontrolwithP = "0"; } } }); } } </code></pre> <p><strong>EDIT(3)</strong>: Html content</p> <pre><code> &lt;div class="consumer-checkbox-wrap checked"&gt; &lt;label class="consumer-communication-label checkbox" for="communication_11"&gt; &lt;input name="communication_11" class="consumer-communication-checkbox checkbox" id="communication_11" type="checkbox" checked="checked" value="true"&gt;&lt;img src="Images/PMURP_Logos/hugg.jpg"&gt; s &lt;p&gt; Please send me communications, savings, and special offers from hugg® Communications &lt;/p&gt; &lt;/label&gt; &lt;input name="communication_11" type="hidden" value="false"&gt;&lt;a href="http://www.hugg.com/email/12162011/SampleNewsletter.html" target="_blank"&gt;&lt;img src="../kcsso/images/Newsletter/hugg.jpg"&gt;&lt;/a&gt; &lt;/div&gt; &lt;div class="consumer-checkbox-wrap"&gt; &lt;label class="consumer-communication-label checkbox" for="communication_13"&gt; &lt;input name="communication_13" class="consumer-communication-checkbox checkbox" id="communication_13" type="checkbox" value="true"&gt;&lt;img src="Images/PMURP_Logos/scott.jpg"&gt; &lt;p&gt; Please send me communications, savings, and special offers from scott® Communications&lt;/p&gt; &lt;/label&gt; &lt;input name="communication_13" type="hidden" value="false"&gt;&lt;a href="http://www.scott.com/email/11042011/samplenewsletter.html" target="_blank"&gt;&lt;img src="../kcsso/images/Newsletter/scott.jpg"&gt;&lt;/a&gt; &lt;/div&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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