Skip to content

Commit

Permalink
Dev: Replace the .attr('checked') method with a .prop() method
Browse files Browse the repository at this point in the history
Dev: .attr('checked') is not supported in jQuery 1.6+
  • Loading branch information
tpartner committed Oct 2, 2013
1 parent 3c3eac6 commit 3b04569
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion application/helpers/qanda_helper.php
Expand Up @@ -2404,7 +2404,7 @@ function do_multiplechoice($ia)
$answer .="<script type='text/javascript'>\n";
$answer .="$('#answer{$myfname}cbox').css('visibility','');";
$answer .="$('#answer{$myfname}').bind('keyup focusout',function(event){\n";
$answer .= " if ($.trim($(this).val()).length>0) { $(\"#answer{$myfname}cbox\").attr(\"checked\",true); } else { \$(\"#answer{$myfname}cbox\").attr(\"checked\",false); }; $(\"#java{$myfname}\").val($(this).val());LEMflagMandOther(\"$myfname\",$('#answer{$myfname}cbox').is(\":checked\")); $oth_checkconditionFunction(this.value, this.name, this.type); \n";
$answer .= " if ($.trim($(this).val()).length>0) { $(\"#answer{$myfname}cbox\").prop(\"checked\",true); } else { \$(\"#answer{$myfname}cbox\").prop(\"checked\",false); }; $(\"#java{$myfname}\").val($(this).val());LEMflagMandOther(\"$myfname\",$('#answer{$myfname}cbox').is(\":checked\")); $oth_checkconditionFunction(this.value, this.name, this.type); \n";
$answer .="});\n";
$answer .="$('#answer{$myfname}cbox').click(function(event){\n";
$answer .= " //if (($(this)).is(':checked')) { $(\"#answer{$myfname}\").focus(); } else { $(\"#answer{$myfname}\").val('');{$checkconditionFunction}(\"\", \"{$myfname}\", \"text\"); }; return true;\n";
Expand Down

0 comments on commit 3b04569

Please sign in to comment.