I was trying to animate an input value, but doesn't work whatever I do. <body> <form> <input type="text" name="name" /> <input type="submit" id="submit" name="submit" value=">" /> </form> <script> function inputValueAnimation() { $("#submit").val().animate( { opacity: 0 }, "fast", "swing").animate( { opacity: 1 }, "fast", "swing"); } $(document).ready(function() { setInterval ( "inputValueAnimation()", 600 ); }); </script> </body> Code (markup):
In your call to setInterval, your function should not be in quotes: setInterval(inputValueAnimation(), 600);