O'Reilly logo

jQuery Tools UI Library by Alex Libby

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Best practices for events and API calls

In this section we will look at some of the best practices for each of the tools, including how to use the API, write events, and design plug-ins using jQuery Tools functionality.

Application Programming Interface (API)

As time goes by, you will want to extend your skills with jQuery Tools you can do this by using its API, which was built to expose methods and access properties for each tool in the library. The API hides the internal values from the outside world, which is good programming practice.

To begin with, you need to create an instance of the API for that tool, such as:

//get access to the API
Var api = $("#scroller").data("scrollable")

You will notice that the argument passed to data in brackets is ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required