I’m trying to implement jQuery prettyCheckable and really i got a nice style :D, but onclick event stopped working for me. I need onclick event in my input checkbox for to call the function.
this checkbox works succesful:
<input id="checkId" type="checkbox" onClick="myFunction()" />
function myFunction() {alert('works! :D');}
this checkbox is very beautiful, but no work onClick event:
$('input.checkStyle').prettyCheckable();
<input id="checkId" type="checkbox" class="checkStyle" onClick="myFunction()" />
function myFunction() {alert('not work :(');}
more information about prettyCheckable here: http://arthurgouveia.com/prettyCheckable/
Thx and sorry my english!
Its not firing because you aren’t clicking on it. You are clicking on placeholder spans that are style-able. To detect the checkbox input changing, use the jquery change event instead of listening for a click.