javascript - Jquery, changing color on hover -
javascript - Jquery, changing color on hover -
this has been driving me crazy while, cannot figure out doing wrong. trying create 4x4 grid , alter color of each square when hover mouse on (the color stays after mouse leaves) changing color part not working. here have far:
changing color on hover:
this part stuck
$('.square').hover(function () { $(this).addclass('hover'); });
you can remove jquery code adding class hover , create css alter in file
.square:hover { background-color: red; }
simply fixes problem in pure css.
adding jsfiddle http://jsfiddle.net/jjeswin/nb3db/1/
javascript jquery html css
Comments
Post a Comment