Great people of StackOverflow, save my ass please :)
I've been trying to get this to work for a while now, i've read the documentation repeatadly, tried lots of stupid things, and now the more I look at it and think my mind goes blank, so if someone could shed some light i'd be grateful. I'm trying to get the jQuery to animate the addClass command. It works fine, adds and removes the class to the element no problem, but I want it to fadeIn the class and then fadeOut the class, here's the code:
<script type="text/javascript">
function addingClasses(id,myClass) {
$(id).addClass(myClass).animate({
show: 'fadeIn',
speed: '2000',
hide: 'fadeOut'
});
}
function removingClasses(id,myClass) {
$(id).removeClass(myClass);
}
</script>
<div id="about" class="sittingPretty" onmouseover="addingClasses(this, 'aboutHover')" onmouseout="removingClasses(this, 'aboutHover')">
<p>About</p>
</div>
If someone could help, i'd be extremely grateful, thanks again guys :)