jQuery CSS and .hover() not picking up style
Posted
by danit
on Stack Overflow
See other posts from Stack Overflow
or by danit
Published on 2010-06-09T13:00:33Z
Indexed on
2010/06/09
13:02 UTC
Read the original article
Hit count: 122
jQuery
Im using jQuery to add .hover
class to list items.
$("#list .item").hover(
function () {
$(this).addClass("hover");
},
function () {
$(this).removeClass("hover");
}
);
Then followed by the style in jQuery (I have to supply the style in JS)
$('#list .item.hover').css('padding-left', '20px');
The hover class is being applied but the style is not picked up?
© Stack Overflow or respective owner