20
20
< script src ="../ui/jquery.ui.draggable.js "> </ script >
21
21
< script src ="../ui/jquery.ui.droppable.js "> </ script >
22
22
< script src ="../ui/jquery.ui.menu.js "> </ script >
23
- < script src ="../ui/jquery.ui.menubar.js "> </ script >
24
- < script src ="../ui/jquery.ui.popup.js "> </ script >
25
23
< script src ="../ui/jquery.ui.position.js "> </ script >
26
24
< script src ="../ui/jquery.ui.progressbar.js "> </ script >
27
25
< script src ="../ui/jquery.ui.resizable.js "> </ script >
111
109
< script src ="../ui/i18n/jquery.ui.datepicker-zh-TW.js "> </ script >
112
110
< script >
113
111
$ ( function ( ) {
114
-
112
+
115
113
$ ( '.left-nav a' ) . click ( function ( ev ) {
116
114
window . location . hash = this . href . replace ( / .+ \/ ( [ ^ \/ ] + ) \/ i n d e x \. h t m l / , '$1' ) + '|default' ;
117
115
loadPage ( this . href ) ;
118
116
$ ( '.left-nav a.selected' ) . removeClass ( 'selected' ) ;
119
117
$ ( this ) . addClass ( 'selected' ) ;
120
118
ev . preventDefault ( ) ;
121
119
} ) ;
122
-
120
+
123
121
if ( window . location . hash ) {
124
122
if ( window . location . hash . indexOf ( '|' ) === - 1 ) {
125
- window . location . hash += '|default' ;
126
- }
123
+ window . location . hash += '|default' ;
124
+ }
127
125
var path = window . location . href . replace ( / ( i n d e x \. h t m l ) ? # / , '' ) ;
128
126
path = path . replace ( '\|' , '/' ) + '.html' ;
129
127
loadPage ( path ) ;
130
- }
128
+ }
131
129
132
- function loadPage ( path ) {
130
+ function loadPage ( path ) {
133
131
var section = path . replace ( / \/ [ ^ \/ ] + \. h t m l / , '' ) ;
134
132
var header = section . replace ( / .+ \/ ( [ ^ \/ ] + ) / , '$1' ) . replace ( / _ / , ' ' ) ;
135
-
133
+
136
134
$ ( 'td.normal div.normal' )
137
135
. empty ( )
138
136
. append ( '<h4 class="demo-subheader">Functional demo:</h4>' )
148
146
$ ( this ) . click ( function ( ) {
149
147
150
148
resetDemos ( ) ;
151
-
149
+
152
150
$ ( this ) . parents ( 'ul' ) . find ( 'li' ) . removeClass ( 'demo-config-on' ) ;
153
151
$ ( this ) . parent ( ) . addClass ( 'demo-config-on' ) ;
154
152
$ ( '#demo-notes' ) . fadeOut ( ) ;
167
165
$ ( '#demo-config-menu a' ) . each ( function ( ) {
168
166
if ( this . href . indexOf ( demo + '.html' ) !== - 1 ) {
169
167
$ ( this ) . parents ( 'ul' ) . find ( 'li' ) . removeClass ( 'demo-config-on' ) ;
170
- $ ( this ) . parent ( ) . addClass ( 'demo-config-on' ) ;
171
- loadDemo ( this . href ) ;
168
+ $ ( this ) . parent ( ) . addClass ( 'demo-config-on' ) ;
169
+ loadDemo ( this . href ) ;
172
170
}
173
171
} ) ;
174
172
}
184
182
. end ( )
185
183
. end ( )
186
184
;
187
-
185
+
188
186
resetDemos ( ) ;
189
187
}
190
-
188
+
191
189
function loadDemo ( path ) {
192
190
var directory = path . match ( / ( [ ^ \/ ] + ) \/ [ ^ \/ \. ] + \. h t m l $ / ) [ 1 ] ;
193
191
$ . get ( path , function ( data ) {
207
205
$ ( '#demo-link a' ) . attr ( 'href' , path ) ;
208
206
updateDemoNotes ( ) ;
209
207
updateDemoSource ( source ) ;
210
-
208
+
211
209
if ( / d e f a u l t .h t m l $ / . test ( path ) ) {
212
210
$ . get ( "documentation/docs-" + path . match ( / d e m o s \/ ( .+ ) \/ / ) [ 1 ] + ".html" , function ( html ) {
213
211
$ ( "#demo-source" ) . after ( html ) ;
241
239
$ ( '#demo-notes' ) . show ( ) ;
242
240
notes . hide ( ) ;
243
241
}
244
-
242
+
245
243
function updateDemoSource ( source ) {
246
244
if ( $ ( '#demo-source' ) . length == 0 ) {
247
245
$ ( '<div id="demo-source"><a href="#" class="source-closed">View Source</a><div><pre><code></code></pre></div></div>' ) . insertAfter ( '#demo-notes' ) ;
257
255
258
256
$ ( '#demo-source code' ) . empty ( ) . text ( cleanedSource ) ;
259
257
}
260
-
258
+
261
259
function resetDemos ( ) {
262
260
$ . datepicker . setDefaults ( $ . extend ( { showMonthAfterYear : false } , $ . datepicker . regional [ '' ] ) ) ;
263
- $ ( ".ui-dialog-content" ) . remove ( ) ;
261
+ $ ( ".ui-dialog-content" ) . remove ( ) ;
264
262
}
265
-
263
+
266
264
} ) ;
267
265
</ script >
268
266
</ head >
285
283
< dd > < a href ="datepicker/index.html "> Datepicker</ a > </ dd >
286
284
< dd > < a href ="dialog/index.html "> Dialog</ a > </ dd >
287
285
< dd > < a href ="menu/index.html "> Menu</ a > </ dd >
288
- < dd > < a href ="menubar/index.html "> Menubar</ a > </ dd >
289
- < dd > < a href ="popup/index.html "> Popup</ a > </ dd >
290
286
< dd > < a href ="progressbar/index.html "> Progressbar</ a > </ dd >
291
287
< dd > < a href ="slider/index.html "> Slider</ a > </ dd >
292
288
< dd > < a href ="spinner/index.html "> Spinner</ a > </ dd >
307
303
< dd > < a href ="widget/index.html "> Widget</ a > </ dd >
308
304
< dt > About jQuery UI</ dt >
309
305
< dd > < a href ="http://jqueryui.com/docs/Getting_Started "> Getting Started</ a > </ dd >
310
- < dd > < a href ="http://jqueryui.com/docs/Upgrade_Guide "> Upgrade Guide</ a > </ dd >
306
+ < dd > < a href ="http://jqueryui.com/docs/Upgrade_Guide "> Upgrade Guide</ a > </ dd >
311
307
< dd > < a href ="http://jqueryui.com/docs/Changelog "> Changelog</ a > </ dd >
312
308
< dd > < a href ="http://jqueryui.com/docs/Roadmap "> Roadmap</ a > </ dd >
313
309
< dd > < a href ="http://jqueryui.com/docs/Subversion "> Subversion Access</ a > </ dd >
@@ -328,7 +324,7 @@ <h3>Instructions</h3>
328
324
< p >
329
325
These demos showcase some common uses of each jQuery UI plugin. Simply copy and paste code from the demos to get started. Have fun playing with them.
330
326
</ p >
331
-
327
+
332
328
</ div >
333
329
334
330
</ td >
0 commit comments