Skip to main content

Bug Tracker

Side navigation

Ticket #6641: animation-test.html

File animation-test.html, 1.1 KB (added by camtarn, June 07, 2010 08:49AM UTC)

Minimal test case

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="" xml:lang="en" lang="en">
        <script src=""></script>
        <style type="text/css">
            div {
                margin: 10px;
                float: left;
                width: 100px;
                height: 100px;
                background: red;
            p {
                margin: 10px;
                clear: both;
        <div id="one">One</div>
        <div id="two">Two</div>
        <p>Click one div, then while it's fading, click the other. The second div's animation will stop as soon as the first one's animation completes.</p>
        <script type="text/javascript">
			$(function() {
			    $('#one, #two').click(function() {
			        $(this).fadeTo( 2000, 0.0, function() {
			        } );
			    } );

Download in other formats:

Original Format