Ich möchte mein Menü animieren, doch leider tut sich nichts. Ich erhalte nur den folgenden Fehler in der Konsole: "Error in parsing value for 'background-position'".
Kann mir bitte jemand behilflich sein?
CSS:
JavaScript
Kann mir bitte jemand behilflich sein?
CSS:
Code:
nav {
float:right;
width:626px; /* 750 - 124 */
height:157px;
}
nav li {
float:left;
margin-left:1px;
font-size:22px;
line-height:45px;
}
nav li a {
display:block;
height:96px;
width:124px;
color:#818080;
text-align:center;
text-decoration:none;
padding-top:60px;
background:url(../img/n1-hover.gif) 0 -146px no-repeat;
}
nav li a:hover, nav .active {
color:white;
}
nav .active { background-position:0 0 !important;
}
nav .n1 {background:url(../img/n1.gif) 0 0 no-repeat;}
nav .n2 {background:url(../img/n2.gif) 0 0 no-repeat;}
nav .n3 {background:url(../img/n3.gif) 0 0 no-repeat;}
nav .n4 {background:url(../img/n4.gif) 0 0 no-repeat;}
nav .n5 {background:url(../img/n5.gif) 0 0 no-repeat;}
JavaScript
Code:
$(document).ready(function() {
$('.menu a').hover(
function(){$(this).stop().animate({backgroundPosition:'0px 0px'}, 800, 'easeOutBounce')},
function(){$(this).stop().animate({backgroundPosition:'0px -146px'}, 600, 'easeOutBounce')});
});