Using Multiple Selectors with the Behaviour JavaScript Library
(Page 1 of 4 )
Building a web site whose structure separates the behavioral layer from visual presentation and markup can be difficult. If you've already lived through that painful experience, you'll welcome a software package that may change that forever. Welcome to the final installment of a series focusing on the Behaviour JavaScript library. This three-part article series teaches you how to use this powerful software to separate your JavaScript routines from your fancy markup.
Introduction
If you already read the first article of this series, then I suppose that using the Behaviour package is something that has become quite familiar to you. As you’ll certainly remember, this JavaScript library comes equipped with a pretty intuitive API, which allows you to quickly assign custom functions to any elements included into a web document by using a diverse range of CSS selectors.
One of the strongest points of Behaviour rests upon the ease with which you can use it to create entire JavaScript layers which are completely separated from the corresponding structural markup. Undoubtedly, this feature encourages web developers to acquire good coding habits and achieve unobtrusive JavaScript programming.
All right, after reading this brief introduction, I believe that you’re already prepared to continue exploring the useful -- and numerous -- capabilities that come bundled with this package. Therefore, over the course of this final article of the series, I’m going to show you some additional examples of how to use Behaviour to assign custom JavaScript functions to multiple elements of a web page, as well as how to work with multiple CSS selectors.
Ready to learn how these hands-on examples will be developed? Okay, let’s get started!
Next: Handling multiple elements of a web document >>
More JavaScript Articles
More By Alejandro Gervasio