]> source.dussan.org Git - jquery.git/commitdiff
Simplified some of the IE styleFloat/cssFloat code.
authorJohn Resig <jeresig@gmail.com>
Sat, 30 Jun 2007 13:47:40 +0000 (13:47 +0000)
committerJohn Resig <jeresig@gmail.com>
Sat, 30 Jun 2007 13:47:40 +0000 (13:47 +0000)
src/jquery/jquery.js

index 5940df380420cd52443c006f001f1870b0a001fe..ef728f032da1dacd7be62b7ace5f138abceed9ca 100644 (file)
@@ -1443,7 +1443,7 @@ jQuery.extend({
                }
                
                if (prop.match(/float/i))
-                       prop = jQuery.browser.msie ? "styleFloat" : "cssFloat";
+                       prop = jQuery.styleFloat;
 
                if (!force && elem.style[prop])
                        ret = elem.style[prop];
@@ -1820,12 +1820,14 @@ new function() {
        // Check to see if the W3C box model is being used
        jQuery.boxModel = !jQuery.browser.msie || document.compatMode == "CSS1Compat";
 
+       jQuery.styleFloat = jQuery.browser.msie ? "styleFloat" : "cssFloat",
+
        jQuery.props = {
                "for": "htmlFor",
                "class": "className",
-               "float": jQuery.browser.msie ? "styleFloat" : "cssFloat",
-               cssFloat: jQuery.browser.msie ? "styleFloat" : "cssFloat",
-               styleFloat: jQuery.browser.msie ? "styleFloat" : "cssFloat",
+               "float": jQuery.styleFloat,
+               cssFloat: jQuery.styleFloat,
+               styleFloat: jQuery.styleFloat,
                innerHTML: "innerHTML",
                className: "className",
                value: "value",