Skip to content

Instantly share code, notes, and snippets.

@ademalp
Created January 15, 2010 12:39
Show Gist options
  • Save ademalp/278019 to your computer and use it in GitHub Desktop.
Save ademalp/278019 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<style>div { margin:3px; width:40px; height:40px;
position:absolute; left:0px; top:30px;
background:green; display:none; }
div.newcolor { background:blue; }
span { color:red; } </style>
<script src="/scripts/jquery-1.4.js"></script>
</head>
<body>
<button id="show">Show Length of Queue</button>
<span></span>
<div></div>
<script>$("#show").click(function () {
var n = $("div").queue("fx");
$("span").text("Queue length is: " + n.length);
});
function runIt() {
$("div").show("slow");
$("div").animate({left:'+=200'},2000);
$("div").slideToggle(1000);
$("div").slideToggle("fast");
$("div").animate({left:'-=200'},1500);
$("div").hide("slow");
$("div").show(1200);
$("div").slideUp("normal", runIt);
}
runIt();</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment