git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a comment explaining that jQuery.map flattens arrays
[jquery.git]
/
src
/
support.js
diff --git
a/src/support.js
b/src/support.js
index
febff15
..
d35dbed
100644
(file)
--- a/
src/support.js
+++ b/
src/support.js
@@
-13,7
+13,9
@@
div.innerHTML = " <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
var all = div.getElementsByTagName("*"),
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 ) {
// Can't get basic test support
if ( !all || !all.length || !a ) {
@@
-56,15
+58,21
@@
// Make sure that a selected-by-default option has a working selected property.
// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
// Make sure that a selected-by-default option has a working selected property.
// (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
- optSelected: document.createElement("select").appendChild( document.createElement("option") ).selected,
+ optSelected: opt.selected,
// Will be defined later
// Will be defined later
+ optDisabled: false,
checkClone: false,
scriptEval: false,
noCloneEvent: true,
boxModel: null
};
checkClone: false,
scriptEval: false,
noCloneEvent: true,
boxModel: null
};
+ // Make sure that the options inside disabled selects aren't marked as disabled
+ // (WebKit marks them as diabled)
+ select.disabled = true;
+ jQuery.support.optDisabled = !opt.disabled;
+
script.type = "text/javascript";
try {
script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
script.type = "text/javascript";
try {
script.appendChild( document.createTextNode( "window." + id + "=1;" ) );
@@
-134,7
+142,7
@@
// release memory in IE
root = script = div = all = a = null;
// release memory in IE
root = script = div = all = a = null;
-})( jQuery );
+})();
jQuery.props = {
"for": "htmlFor",
jQuery.props = {
"for": "htmlFor",