File tree Expand file tree Collapse file tree 1 file changed +22
-4
lines changed
Expand file tree Collapse file tree 1 file changed +22
-4
lines changed Original file line number Diff line number Diff line change 66 < link rel ="stylesheet " href ="../../themes/base/jquery.ui.all.css ">
77 < script src ="../../jquery-1.5.1.js "> </ script >
88 < script src ="../../ui/jquery.ui.core.js "> </ script >
9- < script src ="../../ui/jquery.ui.widget.js "> </ script >
109 < script src ="../../ui/jquery.ui.position.js "> </ script >
10+ < script src ="../../ui/jquery.ui.widget.js "> </ script >
11+ < script src ="../../ui/jquery.ui.button.js "> </ script >
1112 < link rel ="stylesheet " href ="../demos.css ">
1213 < style >
1314 .custom-colorize {
14- font-size : 25px ;
15+ font-size : 20px ;
16+ position : relative;
1517 width : 75px ;
1618 height : 75px ;
1719 }
20+ .custom-colorize-changer {
21+ font-size : 10px ;
22+ position : absolute;
23+ right : 0 ;
24+ bottom : 0 ;
25+ }
1826 </ style >
1927 < script >
2028 $ ( function ( ) {
4048 // prevent double click to select text
4149 . disableSelection ( ) ;
4250
43- // bind click events to random method
44- this . _bind ( {
51+ this . changer = $ ( "<button>" , {
52+ text : "change" ,
53+ className : "custom-colorize-changer"
54+ } )
55+ . appendTo ( this . element )
56+ . button ( ) ;
57+
58+ // bind click events on the changer button to the random method
59+ this . _bind ( this . changer , {
4560 // _bind won't call random when widget is disabled
4661 click : "random"
4762 } ) ;
7893 // events bound via _bind are removed automatically
7994 // revert other modifications here
8095 _destroy : function ( ) {
96+ // remove generated elements
97+ this . changer . remove ( ) ;
98+
8199 this . element
82100 . removeClass ( "custom-colorize" )
83101 . enableSelection ( )
You can’t perform that action at this time.
0 commit comments