Problem with hover event used on <a> and <li> tags [solved]
Posted: Wed Feb 15, 2012 3:38 am
Hey guys ive got a strange issue with css and some jquery script(maybe it's just the html structure)...
this is what's happening:
When I hover the <a href="#"><li></li></a> shiit happens:

And this is what should happen:

It does works like that when i'm hovering the
this is the hover function in jquery:
IDK WTH is happening so could someone please guide me the correct way
Is there like a css rule that should be applied for not happening this?
Thanks for reading my whining!
this is what's happening:
When I hover the <a href="#"><li></li></a> shiit happens:
Code: Select all
<a href="#"><li></li></a>
<a href="#"><li></li></a>
<a href="#"><li></li></a>
<a href="#"><li></li></a>
<a href="#"><li></li></a>

And this is what should happen:

It does works like that when i'm hovering the
Code: Select all
<li><li>
<li><li>
<li><li>
<li><li>
<li><li>
Code: Select all
$("#inner-navbar ul li").hover(function(){
var $index=$(this).index();
var $width=99*$index;
var $height=75;
$(this).css("background","url(images/navbar-sprites.png) -"+$width+"px -"+$height+"px");
},function(){
var $index=$(this).index();
var $width=99*$index;
var $height=0;
$(this).css("background","url(images/navbar-sprites.png) -"+$width+"px -"+$height+"px");
});Is there like a css rule that should be applied for not happening this?
Thanks for reading my whining!