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