tailieunhanh - Wordpress 3.0 jQuery - part 19

Tham khảo tài liệu 'wordpress jquery - part 19', công nghệ thông tin, đồ họa - thiết kế - flash phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | jQuery Animation within WordPress If you have an animation that absolutely should not kick-off until the current animation function has completed the .delay function might not be the best way to go. You can use the step and complete parameters to kick off other functions and animations in the exact order you wish. . jQuery .post first .hide .fadeTo 0 .1 .css height 5px .animate height 500px duration 4000 easing swing queue false step function alert step done complete function alert completely done .fadeTo 4000 1 The previous code snippet will generate JavaScript alerts at the .animate function s completed steps once it s completely finished. WordPress and jQuery Just another WordPress site I ve personally never needed to hook into the step parameter for a WordPress project but I can see how it could be very useful for hooking into and creating a chain of cascading type effects. I have found the complete parameter very useful for many of my animations. 166 Chapter 5 Grabbing the user s attention OK sample code snippets aside it s time to get to work Back in hypothetical land our previous clients have enthusiastically touted our jQuery solutions to a few associates and we now have quite a few requests for help with WordPress sites. Let s walk through a few new hypothetical client situations and see if we can solve their problems. First up a common way many sites employ sticky posts and how to enhance them with a little jQuery animation. Project Animating an alert sticky post Here s a quick and simple one. You ve got a client who has a good friend who runs a non-profit educational organization s site and they need a favor meaning do this for free please . The organization s after-school care runs on the public school s schedule as many kids are bussed over from different schools . If the public school system takes a snow day or some other emergency day the after-school program also closes down. The organization does their best to notify people through their WordPress