File tree Expand file tree Collapse file tree 2 files changed +10
-15
lines changed Expand file tree Collapse file tree 2 files changed +10
-15
lines changed Original file line number Diff line number Diff line change 4
4
< meta charset ="utf-8 ">
5
5
< title > jQuery UI Accordion Test Suite</ title >
6
6
7
- < script src ="../helper/css.js "> </ script >
8
- < script >
9
- window . helper . loadCss ( [ "core" , "accordion" ] ) ;
10
- </ script >
7
+ < script src ="../helper/css.js " data-modules ="core accordion "> </ script >
11
8
12
9
< link rel ="stylesheet " href ="../../../external/qunit/qunit.css ">
13
10
< style >
Original file line number Diff line number Diff line change 1
1
( function ( ) {
2
2
3
- if ( ! window . helper ) {
4
- window . helper = { } ;
5
- }
6
-
7
3
function includeStyle ( url ) {
8
4
document . write ( "<link rel='stylesheet' href='../../../" + url + "'>" ) ;
9
5
}
10
6
11
- window . helper . loadCss = function ( styles ) {
12
- var i ;
13
- for ( i = 0 ; i < styles . length ; i ++ ) {
14
- includeStyle ( "themes/base/" + styles [ i ] + ".css" ) ;
15
- }
16
- } ;
7
+ var scripts = document . getElementsByTagName ( "script" ) ;
8
+ var script = scripts [ scripts . length - 1 ] ;
9
+ var modules = script . getAttribute ( "data-modules" ) . split ( / \s + / ) ;
10
+ var i = 0 ;
11
+
12
+ for ( ; i < modules . length ; i ++ ) {
13
+ document . write ( "<link rel='stylesheet' href='../../../themes/base/" + modules [ i ] + ".css'>" ) ;
14
+ }
17
15
18
- } ( ) ) ;
16
+ } ) ( ) ;
You can’t perform that action at this time.
0 commit comments