File tree Expand file tree Collapse file tree 3 files changed +70
-3
lines changed Expand file tree Collapse file tree 3 files changed +70
-3
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < meta charset ="UTF-8 " />
5
+ < title > Panel Visual Test : Default</ title >
6
+ < link rel ="stylesheet " href ="../visual.css " type ="text/css " />
7
+ < link rel ="stylesheet " href ="../../../themes/base/jquery.ui.all.css " type ="text/css ">
8
+ < script type ="text/javascript " src ="../../../jquery-1.4.2.js "> </ script >
9
+ < script type ="text/javascript " src ="../../../ui/jquery.ui.core.js "> </ script >
10
+ < script type ="text/javascript " src ="../../../ui/jquery.ui.widget.js "> </ script >
11
+ < script type ="text/javascript " src ="../../../ui/jquery.ui.panel.js "> </ script >
12
+ < script type ="text/javascript ">
13
+ $ ( function ( ) {
14
+ $ ( "#panel1" ) . panel ( ) ;
15
+ } )
16
+ </ script >
17
+ </ head >
18
+ < body >
19
+
20
+ < div id ="panel1 ">
21
+ < h3 > < a href ="# "> Panel Header 1</ a > </ h3 >
22
+ < div >
23
+ Panel Content 1
24
+ </ div >
25
+ < h3 > < a href ="# "> Panel Header 2</ a > </ h3 >
26
+ < div >
27
+ Panel Content 2
28
+ </ div >
29
+ < h3 > < a href ="# "> Panel Header 3</ a > </ h3 >
30
+ < div >
31
+ Panel Content 3
32
+ </ div >
33
+ </ div >
34
+
35
+ </ body >
36
+ </ html >
Original file line number Diff line number Diff line change 1
- /* Accordion
1
+ /* Accordion/Panel
2
2
----------------------------------*/
3
3
.ui-accordion .ui-accordion-header { cursor : pointer; position : relative; margin-top : 1px ; zoom : 1 ; }
4
4
.ui-accordion .ui-accordion-li-fix { display : inline; }
7
7
.ui-accordion-icons .ui-accordion-header a { padding-left : 2.2em ; }
8
8
.ui-accordion .ui-accordion-header .ui-icon { position : absolute; left : .5em ; top : 50% ; margin-top : -8px ; }
9
9
.ui-accordion .ui-accordion-content { padding : 1em 2.2em ; border-top : 0 ; margin-top : -2px ; position : relative; top : 1px ; margin-bottom : 2px ; overflow : auto; display : none; zoom : 1 ; }
10
- .ui-accordion .ui-accordion-content-active { display : block; }
10
+ .ui-accordion .ui-accordion-content-active { display : block; }
11
+
12
+ .ui-panel .ui-panel-header { cursor : pointer; position : relative; margin-top : 1px ; zoom : 1 ; }
13
+ .ui-panel .ui-panel-li-fix { display : inline; }
14
+ .ui-panel .ui-panel-header-active { border-bottom : 0 !important ; }
15
+ .ui-panel .ui-panel-header a { display : block; font-size : 1em ; padding : .5em .5em .5em .7em ; }
16
+ .ui-panel-icons .ui-panel-header a { padding-left : 2.2em ; }
17
+ .ui-panel .ui-panel-header .ui-icon { position : absolute; left : .5em ; top : 50% ; margin-top : -8px ; }
18
+ .ui-panel .ui-panel-content { padding : 1em 2.2em ; border-top : 0 ; margin-top : -2px ; position : relative; top : 1px ; margin-bottom : 2px ; overflow : auto; display : none; zoom : 1 ; }
19
+ .ui-panel .ui-panel-content-active { display : block; }
Original file line number Diff line number Diff line change 14
14
( function ( $ ) {
15
15
16
16
$ . widget ( "ui.panel" , {
17
+ _create : function ( ) {
18
+ this . element . addClass ( "ui-panel ui-widget ui-helper-reset" ) ;
19
+
20
+ var self = this ;
21
+ this . headers = this . element . find ( "> li > :first-child,> :not(li):even" ) . addClass ( "ui-panel-header ui-helper-reset ui-state-default ui-corner-all" )
22
+ . bind ( "mouseenter.panel" , function ( ) { $ ( this ) . addClass ( 'ui-state-hover' ) ; } )
23
+ . bind ( "mouseleave.panel" , function ( ) { $ ( this ) . removeClass ( 'ui-state-hover' ) ; } )
24
+ . bind ( "focus.panel" , function ( ) { $ ( this ) . addClass ( 'ui-state-focus' ) ; } )
25
+ . bind ( "blur.panel" , function ( ) { $ ( this ) . removeClass ( 'ui-state-focus' ) ; } )
26
+ . bind ( "click.panel" , function ( e ) { self . click ( $ ( this ) , e ) ; return false ; } ) ;
17
27
28
+ this . headers
29
+ . next ( )
30
+ . addClass ( "ui-panel-content ui-helper-reset ui-widget-content ui-corner-bottom" )
31
+ . hide ( ) ;
32
+ } ,
33
+ destroy : function ( ) {
34
+ $ . widget . prototype . destroy . call ( this ) ;
35
+ } ,
36
+ click : function ( header , event ) {
37
+ header . toggleClass ( "ui-state-active ui-corner-top ui-corner-all" ) ;
38
+ header . next ( ) . toggleClass ( "ui-panel-content-active" ) . slideToggle ( "fast" ) ;
39
+ }
18
40
} ) ;
19
41
20
- } ) ;
42
+ } ( jQuery ) ) ;
You can’t perform that action at this time.
0 commit comments