File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -471,4 +471,13 @@ visibility:hidden;
471471 .ui-hidden-phone {
472472 display : none !important
473473 }
474+ }
475+ /* Scroll measurement helper - used by $.ig.util.getScrollWidth/getScrollHeight */
476+ .ui-ig-scroll-measure {
477+ width : 100px ;
478+ height : 100px ;
479+ position : absolute;
480+ top : -10000px ;
481+ left : -10000px ;
482+ overflow : scroll;
474483}
Original file line number Diff line number Diff line change 11121112
11131113 // Returns the width of the vertical scrollbar
11141114 $ . ig . util . getScrollWidth = function ( ) {
1115- var el = $ ( '<div style="width: 100px; height: 100px; position: absolute; ' +
1116- 'top: -10000px; left: -10000px; overflow: scroll"></div>' )
1115+ var el = $ ( '<div></div>' ) . addClass ( 'ui-ig-scroll-measure' )
11171116 . appendTo ( $ ( document . body ) ) , scrollWidth ;
11181117 scrollWidth = el [ 0 ] . offsetWidth - el [ 0 ] . clientWidth ;
11191118 el . remove ( ) ;
11221121
11231122 // Returns the height of the horizontal scrollbar
11241123 $ . ig . util . getScrollHeight = function ( ) {
1125- var el = $ ( '<div style="width: 100px; height: 100px; position: absolute; ' +
1126- 'top: -10000px; left: -10000px; overflow: scroll"></div>' )
1124+ var el = $ ( '<div></div>' ) . addClass ( 'ui-ig-scroll-measure' )
11271125 . appendTo ( $ ( document . body ) ) , scrollHeight ;
11281126 scrollHeight = el [ 0 ] . offsetHeight - el [ 0 ] . clientHeight ;
11291127 el . remove ( ) ;
You can’t perform that action at this time.
0 commit comments