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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -