Código HTML:
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <style type="text/css"> #Cuadro { width:80px; height:30px; background-color: black; color:White; } </style> <script type="text/javascript" src="http://code.jquery.com/jquery-1.9.1.min.js"></script> <script type="text/javascript" src="http://code.jquery.com/jquery-migrate-1.1.1.min.js"></script> <script type="text/javascript" > $(document).ready(function () { $("#Cuadro").mouseover(function () { $(this).animate({ width: 0 }); var color = $('#Cuadro').css('width'); if (color == "80px") { $(this).animate({ backgroundColor: 'White' , width: 110 }); document.getElementById('Cuadro').innerHTML = "Nuevo menu"; } }); $("#Cuadro").mouseout(function(){ $(this).animate({ width: 80 }); var color = $('#Cuadro').css('width'); if (color == "110px") { document.getElementById('Cuadro').innerHTML = "Menu 1"; } }); }); </script> </head> <body> <div id="Cuadro">Menu 1</div> </body> </html>