2011-03-02 17 views
6

tengo este script:paso del ratón y la función jQuery mouseOut

$("#teaser ul.buttons li").mouseover(function() 
    { 
     $("a",this).animate({ left: '0' },350); 
    }).mouseout(function() 
    { 

     $("a",this).animate({ left: '-11px' },350); 
    }); 

Pero cuando ahora se ciernen sobre el elemento. El mouseover y mouseout van continuos. ¿Cómo puedo cambiar este script? Eso cuando estoy sobre el elemento a. Que el mouseout se inicie cuando estoy sobre el elemento.

+1

¿podría añadir un código HTML? – JohnP

Respuesta

6

¿Es http://jsfiddle.net/BBUJ7/ lo que está buscando? Cambié el mouseover y el mouseout al hover ya que mencionaste al colocar el cursor en la pregunta y agregué la regla CSS a {position:relative}.

1

Aquí tienes código html:

<ul class="buttons"> 
        <li> 
         <h2> 
          <a class="koeriersdiensten" href="pagina.html" title="Koeriersdiensten">Koeriersdiensten 
           <span>Lorem ipsum dolor sit amet</span> 
          </a> 
         </h2> 
        </li> 
        <li> 
         <h2> 
          <a class="taxivervoer" href="pagina.html" title="Taxivervoer">Taxivervoer 
           <span>Lorem ipsum dolor sit amet</span> 
          </a> 
         </h2> 
        </li> 
       </ul> 
Cuestiones relacionadas