]> source.dussan.org Git - jquery.git/commitdiff
Some minor cleanup of the last commit.
authorjeresig <jeresig@gmail.com>
Mon, 27 Sep 2010 14:21:50 +0000 (10:21 -0400)
committerjeresig <jeresig@gmail.com>
Mon, 27 Sep 2010 14:21:50 +0000 (10:21 -0400)
src/attributes.js
src/support.js

index dd6a3e7abe641b387aaa0077bdc30387373acb7d..cb9f2cf5e073e997d6c04a86e9400cfa8b4eedcc 100644 (file)
@@ -164,7 +164,7 @@ jQuery.fn.extend({
                                                var option = options[ i ];
 
                                                // Don't return options that are disabled or in a disabled optgroup
-                                               if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && 
+                                               if ( option.selected && (jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null) && 
                                                                (!option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" )) ) {
 
                                                        // Get the specific value for the option
index 2015918930e23696ec9e2f6d25f3c56061248bd9..d35dbed2d847cbed0d346dd35d20dd9642124b32 100644 (file)
        div.innerHTML = "   <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
 
        var all = div.getElementsByTagName("*"),
-               a = div.getElementsByTagName("a")[0];
+               a = div.getElementsByTagName("a")[0],
+               select = document.createElement("select"),
+               opt = select.appendChild( document.createElement("option") );
 
        // Can't get basic test support
        if ( !all || !all.length || !a ) {
                return;
        }
 
-       var select = document.createElement("select");
-       var opt = select.appendChild( document.createElement("option") );
-
        jQuery.support = {
                // IE strips leading whitespace when .innerHTML is used
                leadingWhitespace: div.firstChild.nodeType === 3,