From ab1e8d3595f98688599f6ab50104cdb9cc526282 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Sun, 5 Feb 2012 08:07:35 -0800 Subject: [PATCH] Added quick docs --- docs/index.html | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/docs/index.html b/docs/index.html index 3a866df..5c13abe 100644 --- a/docs/index.html +++ b/docs/index.html @@ -548,6 +548,54 @@

Example

+ +
+

SplitButton

+

The split button component

+ +
+

Example

+

The SplitButton component emits three events, "click" when the button itself is clicked, "show" and "hide" for when the contents display is toggled. This component is abstract, it is not bound to a Menu or ColorPicker etc, one should inherit from this component to display content.

+ + +

+ +
var button = new ui.SplitButton('Action');
+
+button.on('click', function(){
+  ui.notify('Button clicked');
+});
+
+button.on('show', function(){
+  ui.notify('Show dropdown');
+});
+
+button.on('hide', function(){
+  ui.notify('Hide dropdown');
+});
+
+button.el.appendTo('.example-split-button');
+          
+
+
\ No newline at end of file