【发布时间】:2012-07-03 16:45:37
【问题描述】:
我有以下脚本可以在我的导航项上为背景图像精灵设置动画:
$j(function() {
$j(".menu-item:not(.current-menu-item) .bottom_nav").hover( function () {
$j(this).animate( {
backgroundPosition : '0px 35px'}
, 300); }
, function () {
$j(this).animate( {
backgroundPosition : '0px 0px'}
, 600); }
);
});
我现在想从悬停脚本中排除第二个类。我尝试将其添加到表单中:
$j(".menu-item:not(.current-menu-item, .current-menu-parent) .bottom_nav").hover( function () {
和
$j(".menu-item:not('.current-menu-item, .current-menu-parent') .bottom_nav").hover( function () {
但两者都破坏了悬停脚本。
【问题讨论】:
标签: jquery function class hover