]> source.dussan.org Git - jquery-ui.git/commitdiff
Position: Don't create `$.support.offsetFractions`
authorScott González <scott.gonzalez@gmail.com>
Thu, 3 Apr 2014 14:54:52 +0000 (10:54 -0400)
committerScott González <scott.gonzalez@gmail.com>
Thu, 3 Apr 2014 14:54:52 +0000 (10:54 -0400)
ui/position.js

index a6f210dc0e800f54f4651001d9d17e4412cde9d6..53e5a1d9d7a26e6165a0293c3096652b5625e22d 100644 (file)
@@ -23,7 +23,7 @@
 
 $.ui = $.ui || {};
 
-var cachedScrollbarWidth,
+var cachedScrollbarWidth, supportsOffsetFractions,
        max = Math.max,
        abs = Math.abs,
        round = Math.round,
@@ -236,7 +236,7 @@ $.fn.position = function( options ) {
                position.top += myOffset[ 1 ];
 
                // if the browser doesn't support fractions, then round for consistent results
-               if ( !$.support.offsetFractions ) {
+               if ( !supportsOffsetFractions ) {
                        position.left = round( position.left );
                        position.top = round( position.top );
                }
@@ -501,7 +501,7 @@ $.ui.position = {
        div.style.cssText = "position: absolute; left: 10.7432222px;";
 
        offsetLeft = $( div ).offset().left;
-       $.support.offsetFractions = offsetLeft > 10 && offsetLeft < 11;
+       supportsOffsetFractions = offsetLeft > 10 && offsetLeft < 11;
 
        testElement.innerHTML = "";
        testElementParent.removeChild( testElement );