I am using jQuery for addClass to hover over a div ... but the background color will not change. I guess this is because it was previously assigned a background color in CSS? Other properties (border) in the hover class appear when it hangs, so addClass works.
How can I do this job?
JQuery
$('.pick1-box').hover( -> $(this).addClass('hover') -> $(this).removeClass('hover') )
CSS
.pick1-box, .pick2-box { ... background:
HTML
... <li class='nominee clearfix' id='146'> <div class='candidate'> <img alt="Enders" height="80" src="/assets/25803sm.jpg" /> Dick Waddington </div> <div class='pick-boxes'> <div class='pick1-box'> 1 </div> <div class='pick2-box'> 2 </div> </div> </li> ...
source share