forum

Home / DeveloperSection / Forums / Irritating magnify effect on mouse hover

Irritating magnify effect on mouse hover

Anonymous User 1827 15-Jun-2013
Hi Expert,

I have three link enclosed with ul li tag.I want my each link to magnify when someone mouse hover it. I know it can be done using absolute positioning and z-index. I tried something but I am not getting it right.T he problem with my jsFiddle is the 2nd li element after magnifying takes two line.

Can someone help me with it.

Here is my HTML

<ul>
<li> <a href="#">Home</a> </li>
<li> <a href="#">About us</a> </li>
<li> <a href="#">Contact us</a> </li>
</ul>

Here is my Jquery

$(function(){
var t = 10;
$('li').each(function(e,i){
    $(this).offset({top:50,left:t});
    t+=100;
});
$('a').hover(function(){
    $(this).animate({'z-index':'1','font-size':'30px'},50);
      },
      function(){
          $(this).animate({'z-index':'0','font-size':'15px'},50);
    });
});

Here is CSS :

a {
text-decoration:none;
font-size: 15px;
}
ul {
list-style-type:none;
}
li {
padding-left: 50px;
width:100px;
text-align:center;
position:absolute;
}

Thanks in advance for any recommendations or solutions.

Updated on 15-Jun-2013
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By