$('a', '#nav').hover(function() {
if(!$(this).parent().hasClass('current')) {
$(this).stop().animate({
backgroundPosition: '(0 -75px)'
});
}
}, function() {
if(!$(this).parent().hasClass('current')) {
$(this).stop().animate({
backgroundPosition: '(0 -0)'
});
}
});
在鼠标悬停时向上和向下滑动链接的背景图像。需要 背景位置插件。
这太棒了。感谢分享
参考网址在2010年9月28日已返回404错误。