سؤال

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