summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorgnarf <gnarf@gnarf.net>2011-03-08 16:04:55 -0600
committerScott González <scott.gonzalez@gmail.com>2011-03-09 08:45:46 -0500
commit6bd5c08a1d3f28976ef2fb8c31988cd9c18ee055 (patch)
treec4b33f11ab69757616456cb975f3a4abccefbbef /demos
parenta067dfa8a22f9705bd062cfd651feb0bff3e3cf6 (diff)
downloadjquery-ui-6bd5c08a1d3f28976ef2fb8c31988cd9c18ee055.tar.gz
jquery-ui-6bd5c08a1d3f28976ef2fb8c31988cd9c18ee055.zip
Effects demo: Animate a containing div instead of the canvas directly for easing demo. Fixes #7086 - easing only first click is working.
Canvas seems to be animating poorly in Chrome 11 - and animating the height only is scaling width too in some browsers yet not others... (cherry picked from commit fa7f5d2873b1fef978eab7d9f342c5afa77e061c)
Diffstat (limited to 'demos')
-rw-r--r--demos/effect/easing.html7
1 files changed, 4 insertions, 3 deletions
diff --git a/demos/effect/easing.html b/demos/effect/easing.html
index d76957118..0b6ba0885 100644
--- a/demos/effect/easing.html
+++ b/demos/effect/easing.html
@@ -33,7 +33,8 @@
}
var graph = $( "<div/>" ).addClass( "graph" ).appendTo( "#graphs" ),
text = $( "<div/>" ).text( ++i + ". " + name ).appendTo( graph ),
- canvas = $( "<canvas/>" ).appendTo( graph )[ 0 ];
+ wrap = $( "<div/>" ).appendTo( graph ).css( 'overflow', 'hidden' ),
+ canvas = $( "<canvas/>" ).appendTo( wrap )[ 0 ];
canvas.width = width;
canvas.height = height;
var drawHeight = height * 0.8,
@@ -78,9 +79,9 @@
});
ctx.stroke();
graph.click(function() {
- $( canvas )
+ wrap
.animate( { height: "hide" }, 2000, name )
- .animate( { left: 0 }, 800 )
+ .delay( 800 )
.animate( { height: "show" }, 2000, name );
});