Pregunta

I need to expand a div when the mouse over that, that occur pretty well but when the mouse leave the div doesn't get back to normal

heres some come and my file http://jsfiddle.net/MyKnB/

$("#logo-expand").mouseenter(function() {
    $(this).animate({
        width: "56px;"
    }, 300 );
});

$("#logo-expand").mouseleave(function() {
    $(this).animate({
        width: "170px"
    }, 300 );
});
¿Fue útil?

Solución

The issue is the ; after 56px. If you change that line to width: "56px" instead, it works properly. See here: http://jsfiddle.net/MyKnB/1/

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top