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

Producing Effects with CSS Classes > The addClass (), removeClass (), and toggl...

The addClass (), removeClass (), and toggleClass () Improved Methods

jQuery UI has also improved the addClass (), removeClass (), and toggleClass () methods provided by jQuery. The options for these classes are listed in Table 14-14.

The new form of the addClass () method is:

$(selector, context).addClass (className, duration, easing, callback);

The new form of the removeClass () method is:

$(selector, context).removeClass (className, duration, easing, callback);

The new form of the toggleClass () method is:

$(selector, context).toggleClass (className, addOrRemove, duration,
                                  easing, callback);
Values for the easing option (2)

Figure 14-17. Values for the easing option (2)

Table 14-14. The toggleClass () method parameters


  

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


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint