aboutsummaryrefslogtreecommitdiffstats
path: root/demos/widget/default.html
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-07-25 11:53:14 -0400
committerScott González <scott.gonzalez@gmail.com>2011-07-25 11:53:14 -0400
commit19a9de7e668cdb3b76c3b733d0147f1853cb38a5 (patch)
treea259b421dd77cbec27e55db9b4d1104bf5214a2a /demos/widget/default.html
parentdaadc343be2f139e82719e2e5ff466aa19ec166f (diff)
parent51ee3be39829e339c8e4bccb532347944e600ca5 (diff)
downloadjquery-ui-19a9de7e668cdb3b76c3b733d0147f1853cb38a5.tar.gz
jquery-ui-19a9de7e668cdb3b76c3b733d0147f1853cb38a5.zip
Merge branch 'master' into core-1.6.1
Conflicts: demos/menubar/default.html tests/unit/autocomplete/autocomplete.html tests/visual/effects/effects.all.html ui/jquery.ui.menu.js ui/jquery.ui.popup.js
Diffstat (limited to 'demos/widget/default.html')
-rw-r--r--demos/widget/default.html26
1 files changed, 22 insertions, 4 deletions
diff --git a/demos/widget/default.html b/demos/widget/default.html
index ff85bee43..4dad912c2 100644
--- a/demos/widget/default.html
+++ b/demos/widget/default.html
@@ -6,15 +6,23 @@
<link rel="stylesheet" href="../../themes/base/jquery.ui.all.css">
<script src="../../jquery-1.6.2.js"></script>
<script src="../../ui/jquery.ui.core.js"></script>
- <script src="../../ui/jquery.ui.widget.js"></script>
<script src="../../ui/jquery.ui.position.js"></script>
+ <script src="../../ui/jquery.ui.widget.js"></script>
+ <script src="../../ui/jquery.ui.button.js"></script>
<link rel="stylesheet" href="../demos.css">
<style>
.custom-colorize {
- font-size: 25px;
+ font-size: 20px;
+ position: relative;
width: 75px;
height: 75px;
}
+ .custom-colorize-changer {
+ font-size: 10px;
+ position: absolute;
+ right: 0;
+ bottom: 0;
+ }
</style>
<script>
$(function() {
@@ -40,8 +48,15 @@
// prevent double click to select text
.disableSelection();
- // bind click events to random method
- this._bind({
+ this.changer = $( "<button>", {
+ text: "change",
+ className: "custom-colorize-changer"
+ })
+ .appendTo( this.element )
+ .button();
+
+ // bind click events on the changer button to the random method
+ this._bind( this.changer, {
// _bind won't call random when widget is disabled
click: "random"
});
@@ -78,6 +93,9 @@
// events bound via _bind are removed automatically
// revert other modifications here
_destroy: function() {
+ // remove generated elements
+ this.changer.remove();
+
this.element
.removeClass( "custom-colorize" )
.enableSelection()