Ver Mensaje Individual
  #7 (permalink)  
Antiguo 13/08/2013, 14:19
Avatar de iEnrique
iEnrique
 
Fecha de Ingreso: abril-2013
Ubicación: España
Mensajes: 346
Antigüedad: 11 años, 1 mes
Puntos: 5
Respuesta: Problema con animate()

Lo tengo así y no me funciona :$ ¿Qué es verdaderamente lo que haga mal?

Código HTML:
Ver original
  1. <!DOCTYPE html>
  2.     <title>Prueba</title>
  3.     <meta charset="utf-8">
  4.     <script type="text/javascript" src="jquery-1.10.2.min.js"></script>
  5.     <script>
  6.         $(document).ready(function(){
  7.             $('#mover').click(function(){
  8.                 var mover = parseFloat($('.menu').css('left')) + 10;
  9.                 $('.menu').animate({ left: mover });
  10.             });
  11.         });
  12.     </script>
  13. </head>
  14.     <div style="position:relative;margin:0 auto;width:800px;">
  15.     <button id="mover">Mover</button>
  16.     <div class="menu" style="background-color:grey;height:500px;width:100px;position:relative;">
  17.     </div>
  18.     </div>
  19. </body>
  20. </html>