jquery - How to display image in place of checkbox? -
i want display green checked image when checkbox checked , when not checked empty box. tried put checkbox in div , set div's background not helping me out. idea do? below output want.

like little jquery , css: demo
<div class="checkbox"> </div> .checkbox{ width: 23px; height: 21px; background: transparent url(http://i.stack.imgur.com/s4p2r.png ) no-repeat 0 50% } .checked{ background: transparent url(http://i.stack.imgur.com/s4p2r.png ) no-repeat 80% 50% } $(".checkbox").click(function(){ $(this).toggleclass('checked') });
Comments
Post a Comment