javascript - How to change prettyCheckable checkbox with jquery (check and uncheck) -
how change prettycheckable checkbox jquery, check , uncheck? tried everything.. i'm able change, checkbox checks , unchecks, visually doesn't change.. tried numerous ways:
$('#part_pac-050-0142').attr('checked', true); $('#part_pac-050-0142').attr("checked","checked"); $('#part_pac-050-0142').prop("checked", true).change(); $("ul > li > div > href", "#radio_parts").addclass("checked"); $('#part_pac-050-0142').addclass("checked", true); $('#part_pac-050-0142').triggerhandler("click"); $('input.prettyc').prettycheckable();
none of worked, none changed visually prettycheckable checkbox..
if u using jquery version jquery 1.6 + use prop
else use attr
here think remove .change()
$('#part_pac-050-0142').prop("checked", true).change();
to:
$('#part_pac-050-0142').prop("checked", true);
Comments
Post a Comment