aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ajax/script.js2
-rw-r--r--src/core.js6
-rw-r--r--src/manipulation.js2
3 files changed, 4 insertions, 6 deletions
diff --git a/src/ajax/script.js b/src/ajax/script.js
index 731f5b609..34ddd0466 100644
--- a/src/ajax/script.js
+++ b/src/ajax/script.js
@@ -34,7 +34,7 @@ jQuery.ajaxTransport( "script", function(s) {
if ( s.crossDomain ) {
var script,
- head = document.getElementsByTagName( "head" )[ 0 ] || document.documentElement;
+ head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement;
return {
diff --git a/src/core.js b/src/core.js
index 915ac6ba4..2e6347236 100644
--- a/src/core.js
+++ b/src/core.js
@@ -574,10 +574,8 @@ jQuery.extend({
if ( data && rnotwhite.test(data) ) {
// Inspired by code by Andrea Giammarchi
// http://webreflection.blogspot.com/2007/08/global-scope-evaluation-and-dom.html
- var head = document.getElementsByTagName("head")[0] || document.documentElement,
- script = document.createElement("script");
-
- script.type = "text/javascript";
+ var head = document.head || document.getElementsByTagName( "head" )[0] || document.documentElement,
+ script = document.createElement( "script" );
if ( jQuery.support.scriptEval() ) {
script.appendChild( document.createTextNode( data ) );
diff --git a/src/manipulation.js b/src/manipulation.js
index 19a6c22ba..841447fa2 100644
--- a/src/manipulation.js
+++ b/src/manipulation.js
@@ -7,7 +7,7 @@ var rinlinejQuery = / jQuery\d+="(?:\d+|null)"/g,
rtbody = /<tbody/i,
rhtml = /<|&#?\w+;/,
rnocache = /<(?:script|object|embed|option|style)/i,
- // checked="checked" or checked (html5)
+ // checked="checked" or checked
rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i,
wrapMap = {
option: [ 1, "<select multiple='multiple'>", "</select>" ],