Is it posible to make an input checkbox a Bootstrap glyphicon?
I want to make up the default checkboxes with a nice Bootstrap glyphicon. For example: glyphicon
glyphicon
If you're able to modify your markup a bit, this should do:
label words $('.glyphy').click(function (e) { if ($(e.target).is('input')) { // prevent double-event due to bubbling $(this).find('.glyphicon').toggleClass('glyphicon-check glyphicon-unchecked'); } });
Demo