Tuesday 2 April 2019

jquery is unable to set the prettyCheckable plugin radio button programmatically

I am using the prettyCheckable jquery plugin to make my checkboxes and radio buttons look pretty and if I use jquery to set the property checked it does not work because the plugin hides the actual checkbox and makes it's own override HTML to pretty up the checkbox/radio, therefore the jquery doesn't recognize when I check the radio or checkbox



//on button click I tried all the things, but nothing is working. please help




    



$('#rdTypeAdd').buttonset();
$('[name="rdTypeAdd"][value="+"]').prop("checked", true);
$('#rdTypeAdd').buttonset("refresh");

//$('[name="rdTypeAdd"][value="+"]').attr("checked", true);
//$('[name="rdTypeAdd"][value="+"]').prop("checked", true).trigger("change");


//($('.rdTypeAdd').prop('checked',true));

No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...