r3336 committed - Tabs manipulation demo: Use button plugin.

r3336 committed - Tabs manipulation demo: Use button plugin.


Revision: 3336
Author: scott.gonzalez
Date: Tue Sep 29 19:33:09 2009
Log: Tabs manipulation demo: Use button plugin.
http://code.google.com/p/jquery-ui/source/detail?r=3336
Modified:
/branches/dev/demos/tabs/manipulation.html
=======================================
--- /branches/dev/demos/tabs/manipulation.html    Thu Sep 17 03:39:12 2009
+++ /branches/dev/demos/tabs/manipulation.html    Tue Sep 29 19:33:09 2009
@@ -5,6 +5,7 @@
    <link type="text/css" href="../../themes/base/ui.all.css"
rel="stylesheet" />
    <script type="text/javascript" src="../../jquery-1.3.2.js"></script>
    <script type="text/javascript" src="../../ui/jquery.ui.core.js"></script>
+    <script type="text/javascript"
src="../../ui/jquery.ui.button.js"></script>
    <script type="text/javascript" src="../../ui/jquery.ui.tabs.js"></script>
    <script type="text/javascript"
src="../../ui/jquery.ui.dialog.js"></script>
    <link type="text/css" href="../demos.css" rel="stylesheet" />
@@ -66,13 +67,11 @@
        }
        // addTab button: just opens the dialog
-        $('#add_tab').click(function() {
-            $dialog.dialog('open');
-        }).hover(function() {
-            $(this).addClass("ui-state-hover");
-        }, function() {
-            $(this).removeClass("ui-state-hover");
-        });
+        $('#add_tab')
+            .button()
+            .click(function() {
+                $dialog.dialog('open');
+            });
        // close icon: removing the tab on click
        // note: closable tabs gonna be an option in the future - see
http://dev.jqueryui.com/ticket/3924
@@ -98,7 +97,7 @@
        </form>
    </div>
-    <button id="add_tab" class="ui-button ui-state-default ui-corner-all">Add
Tab</button>
+    <button id="add_tab">Add Tab</button>
    <div id="tabs">
        <ul>