Replicate Suckerfish Menus.
$(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); }
);
});
};
/*
Code Highlighting
Courtesy of Dean Edwards star-light
http://dean.edwards.name/my/behaviors/#star-light.htc
- with jQuery methods added, of course
*/
These examples are here for your own learning. If you find yourself using part or all of them, give credit where appropriate. Enjoy!
Myles Angell July 31st, 2006