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/
mouseenter/mouseleave div expand
-
01-06-2022 - |
Pergunta
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 );
});
Solução
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow