Animate only working in IE
This sure has me puzzled since it's usually the other way around. The script below, straight from a book, works in IE, but not in FF, Chrome, or Safari. Can anyone tell me what I'm not doing that would work in the Good browsers
- <head>
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
- <style>
- div {
- background-color:cyan;
- width:100px;
- border:1px solid blue;
- }
- </style>
- </head>
- <body>
- <script type="text/javascript">
- jQuery(function(){
- jQuery('button#foo').click(function(){
- jQuery("#target").animate({
- width: 500,
- opacity: 0.5,
- fontSize: 25,
- marginLeft: 37,
- borderWidth: 15
- }, 1000 );
- });
- });
- </script>
- <h1>Creating custom animation</h1>
- <div id="target">Expand me</div>
- <br>
- <form>
- <button id="foo">Animate</button>
- </form>
- </body>