[jQuery] Drop-down code broken
Hello, I'm pretty new to jQuery and found a nice drop-down menu on the
web I'd like to use. However, the code for the drop-down effect
doesn't seem to work, and I believe it's because the jQuery library
they use is from 2006. Here is the old code:
<script type="text/javascript">
$(document).ready(function(){
$("#nav-one li").hover(
function(){ $("ul", this).fadeIn("fast"); },
function() { }
);
if (document.all) {
$("#nav-one li").hoverClass ("sfHover");
}
});
$.fn.hoverClass = function(c) {
return this.each(function(){
$(this).hover(
function() { $(this).addClass(c); },
function() { $(this).removeClass(c); }
);
});
};
</script>
Can anyone help me with this, or is it even needed? The menu seems to
come down by itself with the CSS, but I like the little face effect.
Here's where I got it from:
http://be.twixt.us/jquery/suckerFish.php
So basically all I want it to do is fade on the drop-down, just like
it does on that site, but I want it to work with the latest version of
jQuery. Can anyone help me? I'd really appreciate it. Thanks!