File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ npm install scrollparent --save
1414## Example
1515
1616``` js
17- Scrollparent (document .getElementById (" content" )) // window
17+ Scrollparent (document .getElementById (" content" )) // document.body
1818```
1919
2020``` js
Original file line number Diff line number Diff line change 3030 }
3131 }
3232
33- return window ;
33+ return document . body ;
3434 } ;
3535
3636 // If common js is defined use it.
Original file line number Diff line number Diff line change 127127
128128equal ( Scrollparent ( document . getElementById ( "test1" ) ) . className , "scroll" ) ;
129129
130- equal ( Scrollparent ( document . getElementById ( "test2" ) ) , window ) ;
131- equal ( Scrollparent ( document . getElementById ( "test3" ) ) , window ) ;
130+ equal ( Scrollparent ( document . getElementById ( "test2" ) ) , document . body ) ;
131+ equal ( Scrollparent ( document . getElementById ( "test3" ) ) , document . body ) ;
132132
133133equal ( Scrollparent ( document . getElementById ( "test4" ) ) . className , "scroll-y" ) ;
134134equal ( Scrollparent ( document . getElementById ( "test5" ) ) . className , "scroll-x" ) ;
You can’t perform that action at this time.
0 commit comments