O'Reilly logo

YUI 2.8 Learning the Library by Dan Wellman, Daniel Barreiro

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

Using the Split Button type

Using most of the different Button Controls is similar to what we did previously; each Button can be initially configured via a series of attributes, and those attributes can be easily set or obtained at any point in the script. As we saw in the previous example, using the custom events defined by each class is equally as simple.

Two Button types that we didn't cover in the last example were the Menu Button and Split Button types, both of which are highly specialized controls not available natively under HTML.

The Menu Button displays a Menu when it is clicked, allowing us to bundle up a series of related actions into a single Button object. The Split Button is similar but its face is split into two sections—the Button ...

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