I am using jQuery Uniform to style inputs/selects etcs. However, the checkbox has stopped working. I am appending
data sent from an ajax call. Once it\'s loaded
You don't need to change .attr()
to .prop()
:
"click.uniform touchend.uniform": function(){
if(!$(elem).attr('checked')){
//box was just unchecked, uncheck span
spanTag.removeClass(options.checkedClass);
//Added by PingOn
$(elem).removeAttr('checked');
//end addition by PingOn
// Added by John
}else if(!$(elem).is(':checked')){
spanTag.removeClass(options.checkedClass);
// end addition by john
//Added by PingOn
$(elem).removeAttr('checked');
//end addition by PingOn
}else{
//box was just checked, check span.
spanTag.addClass(options.checkedClass);
//Added by PingOn
$(elem).attr('checked','true');
//end addition by PingOn
}
Couldn't you use something like
$("#checkbox").attr("checked", "true");
to make the checkbox checked, and
$("#checkbox").removeAttr("checked");
to uncheck it?