Free Trial

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


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 2. Working with jQuery in WordPr... > Making it all easy with statement ch...

Making it all easy with statement chaining

A&;&;s I've mentioned, one of jQuery's many powerful features is statement chaining, that is, stringing multiple functions together that will be performed in the order they're added to the chain (left to right) on the selected set all in one nice string of code. For example, we can change a CSS property, hide the selected elements, and fade them smoothly with one line of code:

...
jQuery(".post").css("background", "#f60").hide().fadeIn("slow");
...


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial