Bug Tracker

Ticket #7109: animate.html

File animate.html, 433 bytes (added by kellyfelkins, 12 years ago)

animates a div from 30% to 1% width. Has initial bump on webkit

Line 
1<!DOCTYPE html>
2<html>
3<head>
4  <style>
5div { 
6background-color:#bca; 
7width:20%; 
8border:1px solid green;
9}
10</style>
11  <script src="http://code.jquery.com/jquery-latest.min.js"></script>
12</head>
13<body>
14  <button id="go">&raquo; Run</button>
15
16<div id="block">Hello!</div>
17<script>
18
19/* Using multiple unit types within one animation. */
20
21$("#go").click(function(){
22  $("#block").animate({width: "1%"});
23});
24</script>
25
26</body>
27</html>