@@ -22,7 +22,7 @@ Sections.prototype = {
22
22
return {
23
23
id : this . id . replace ( '.intro' , '' ) ,
24
24
offset : $ ( this ) . offset ( ) . top - 20 ,
25
- title : $ ( this ) . find ( ':header:first' ) . text ( )
25
+ title : $ ( this ) . find ( ':header:first' ) . html ( )
26
26
} ;
27
27
28
28
} ) . get ( ) ;
@@ -121,19 +121,22 @@ Sections.prototype = {
121
121
122
122
setLink : function ( ele , data ) {
123
123
ele . slideDown ( 100 ) . attr ( 'href' , '#' + data . id )
124
- . find ( '.nav_section_name' ) . text ( data . title ) ;
124
+ . find ( '.nav_section_name' ) . html ( data . title ) ;
125
125
}
126
126
} ;
127
127
128
128
129
129
// This more or less controls the page ------------------------------------------
130
130
// ------------------------------------------------------------------------------
131
131
function Page ( ) {
132
- this . window = $ ( window ) ;
133
- this . nav = $ ( 'nav > ul > li' ) ;
132
+ $ . extend ( true , this , {
133
+ window : $ ( window ) ,
134
+ nav : $ ( 'nav > ul > li' ) ,
135
+ section : null ,
136
+ articule : null
137
+ } ) ;
138
+
134
139
this . sections = new Sections ( this ) ;
135
- this . section = null ;
136
- this . article = null ;
137
140
this . init ( ) ;
138
141
}
139
142
@@ -142,12 +145,15 @@ Page.prototype = {
142
145
var that = this ,
143
146
mainNav = $ ( '#nav_main' ) ;
144
147
145
- this . scrollLast = 0 ;
148
+ $ . extend ( this , {
149
+ scrollLast : 0 ,
150
+ resizeTimeout : null
151
+ } ) ;
152
+
146
153
this . window . scroll ( function ( ) {
147
154
that . onScroll ( ) ;
148
155
} ) ;
149
-
150
- this . resizeTimeout = null ;
156
+
151
157
this . window . resize ( function ( ) {
152
158
that . onResize ( ) ;
153
159
} ) ;
0 commit comments