File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 24
24
select = this . element . hide ( ) ,
25
25
selected = select . children ( ":selected" ) ,
26
26
value = selected . val ( ) ? selected . text ( ) : "" ;
27
- var input = $ ( "<input>" )
27
+ var input = this . input = $ ( "<input>" )
28
28
. insertAfter ( select )
29
29
. val ( value )
30
30
. autocomplete ( {
81
81
. appendTo ( ul ) ;
82
82
} ;
83
83
84
- $ ( "<button> </button>" )
84
+ this . button = $ ( "<button> </button>" )
85
85
. attr ( "tabIndex" , - 1 )
86
86
. attr ( "title" , "Show All Items" )
87
87
. insertAfter ( input )
104
104
input . autocomplete ( "search" , "" ) ;
105
105
input . focus ( ) ;
106
106
} ) ;
107
+ } ,
108
+
109
+ destroy : function ( ) {
110
+ this . input . remove ( ) ;
111
+ this . button . remove ( ) ;
112
+ this . element . show ( ) ;
113
+ $ . Widget . prototype . destroy . call ( this ) ;
107
114
}
108
115
} ) ;
109
116
} ) ( jQuery ) ;
You can’t perform that action at this time.
0 commit comments