Вопрос

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 );
});
Это было полезно?

Решение

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/

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top