Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

Share this Page URL

Creating and Managing the Effect Queue > Creating and Managing the Effect Queue - Pg. 298

CHAPTER 10 USING JQUERY EFFECTS Listing 10-15. Creating an Effect Queue ... <script type="text/javascript"> $(document).ready(function() { $('form').css({"position": "fixed", "top": "70px", "z-index": "2"}); $('h1').css({"position": "fixed", "z-index": "1", "min-width": "0"}); var timespan = "slow"; cycleEffects(); function cycleEffects() { $('h1') .animate({left: "+=100"}, timespan) .animate({left: "-=100"}, timespan) .animate({height: 223,width: 700}, timespan) .animate({height: 30,width: 500}, timespan) .slideUp(timespan) .slideDown(timespan, cycleEffects); } }); </script> ... This script in this example uses regular jQuery method chaining to string together a series of effects