Animate Jquery addClass on hover
Posted
by JamesOps
on Stack Overflow
See other posts from Stack Overflow
or by JamesOps
Published on 2010-03-29T14:46:25Z
Indexed on
2010/03/29
14:53 UTC
Read the original article
Hit count: 470
jQuery
I'm new to Jquery so unsure how i would go about editing the code below to create a fade in when the class element is hovered over.
<script type="text/javascript">
<!--//--><![CDATA[//><!--
$(function() {
$('div.work-item').hover(function() {
}).hover(function() {
$(this).addClass("hover");
}, function(){
$(this).removeClass("hover");
});
});
//--><!]]>
Any pointers would be greatly appreciated.
Thanks!
© Stack Overflow or respective owner