Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 117 lines (94 sloc) 5.22 KB
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>decodeURI &raquo; jQuery FxQueues plugin 2.0.3</title>
<style type="text/css" media="screen">
div.animate { width: 40px; height: 40px; background: black; float: left; margin: 10px; }
* { outline: 0; }
</style>
<body>
<div class="animate" id="1"></div>
<div class="animate" id="2"></div>
<div class="animate" id="3"></div>
<div class="animate" id="4"></div>
<div class="animate" id="5"></div>
<div class="animate" id="6"></div>
<div class="animate" id="7"></div>
<div class="animate" id="8"></div>
<div class="animate" id="9"></div>
<div class="animate" id="10"></div>
<div style="position: absolute; right: 50px; bottom: 20px;">
<input type="image" id="play" src="example_files/play.png" style="display: none;" />
<input type="image" id="pause" src="example_files/pause.png" />
<input type="image" id="stop" src="example_files/stop.png" />
</div>
</body>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js"></script>
<script type="text/javascript" src="jquery.fxqueues-2.0.3.js"></script>
<script type="text/javascript">
function animation() {
$("div.animate").fadeOut({duration: 1000, queue: "global"});
$("div.animate").fadeIn({duration: 125, queue: "global"});
$("div.animate").fadeOut({duration: 125, queue: "global"});
$("div.animate").fadeIn({duration: 125, queue: "global"});
$("div.animate").each(function(i, e) {
$(e).animate({height: "80px"}, {duration: 200, queue: "global" });
});
$("div.animate").each(function() {
$(this).animate({marginLeft: "0px", marginRight: "0px"}, {duration: 75, queue: "global"});
});
$("#1").animate({marginTop: "100px"}, {duration: 100, queue: "global"});
$("#2").animate({marginTop: "100px"}, {duration: 100, queue: "global"});
$("#3").animate({marginTop: "100px"}, {duration: 100, queue: "global"});
$("#4").animate({marginTop: "100px"}, {duration: 500, queue: "global", scope: "goDown"});
$("#5").animate({marginTop: "100px"}, {duration: 500, queue: "global", scope: "goDown"});
$("#6").animate({marginTop: "100px"}, {duration: 500, queue: "global", scope: "goDown"});
$("#7").animate({marginTop: "100px"}, {duration: 500, queue: "global", scope: "goDown"});
$("#8").animate({marginTop: "100px"}, {duration: 100, queue: "global"});
$("#9").animate({marginTop: "100px"}, {duration: 100, queue: "global"});
$("#10").animate({marginTop: "100px"}, {duration: 100, queue: "global"});
$("#1").animate({marginLeft: "200px"}, {duration: 500, queue: "global"});
$("div.animate:odd").animate({marginTop: "50px"}, {duration: 250, queue: "global"});
$("div.animate:even").animate({marginTop: "200px"}, {duration: 250, queue: "global"});
$("#1").animate({opacity: 0.1}, {duration: 250, queue: "global", scope: "01"});
$("#3").animate({opacity: 0.2}, {duration: 200, queue: "global", scope: "01"});
$("#5").animate({opacity: 0.3}, {duration: 150, queue: "global", scope: "01"});
$("#7").animate({opacity: 0.4}, {duration: 100, queue: "global", scope: "01"});
$("#9").animate({opacity: 0.5}, {duration: 50, queue: "global", scope: "01"});
$("#10").animate({opacity: 0.1}, {duration: 250, queue: "global", scope: "02"});
$("#8").animate({opacity: 0.2}, {duration: 200, queue: "global", scope: "02"});
$("#6").animate({opacity: 0.3}, {duration: 150, queue: "global", scope: "02"});
$("#4").animate({opacity: 0.4}, {duration: 100, queue: "global", scope: "02"});
$("#2").animate({opacity: 0.5}, {duration: 50, queue: "global", scope: "02"});
$("div.animate").animate({opacity: 1}, {duration: 200, queue: "global", preDelay: 1500});
$("div.animate").animate({width: "40px", height: "40px"}, {duration: 250, queue: "global"});
$("div.animate").animate({width: "40px", height: "40px"}, { preDelay: 250, duration: 200, queue: "global"});
$("div.animate").animate({marginTop: "10px"}, { preDelay: 50, duration: 200, queue: "global"});
$("div.animate").animate({marginLeft: "10px"}, { preDelay: 50, duration: 200, queue: "global", complete: function () {
$("div.animate").css({margin: "10px", width: "40px", height: "40px"});
$("#pause").hide();
$("#play").show();
}});
}
/* Attach play|pause|stop events */
$("#stop").click(function(event) {
$.fxqueue("global").stop();
$("div.animate").css({margin: "10px", width: "40px", height: "40px"});
$("#pause").hide();
$("#play").show();
});
$("#play").click(function(event) {
if ( $.fxqueue("global").length > 0 )
$.fxqueue("global").start();
else
animation();
$("#pause, #play").toggle();
});
$("#pause").click(function(event) {
$.fxqueue("global").pause();
$("#pause, #play").toggle();
});
animation();
</script>
</html>