I have a hidden element called #inf_option_isGmail that is a checkbox. I have some code on the page, that checks if it a field has a gmail address in it, so I can do something special to handle their promotions tab.
I tried to work this out from this question or this question but I cannot.
Here is my code:
jQuery( "#inf_field_Email" )
.keyup(function() {
var str = jQuery( this ).val();
if (str.toLowerCase().indexOf("gmail") >= 0) {
jQuery('#inf_option_isGmail').prop('checked', true);
}
})
.keyup();
[]
Problem is I can't make it actually check the box :(
<div style="display:none;">
<input id="inf_option_IsGmail" name="inf_option_isGmail" type="checkbox" value="2172">
</div>
This is all on page: http://ww2.auspiciousartsincubator.org/artist-grant-crossroads/d.html?inf_custom_ReferralQScr=blah
any ideas why this isn't working?
I have tried
jQuery('#inf_option_isGmail').click();
jQuery('#inf_option_isGmail').attr('checked',true);
jQuery('#inf_option_isGmail').each(function(){ this.checked = true; });