From ac48a19b92e60f08e5b00a46b5551a503c292fd5 Mon Sep 17 00:00:00 2001 From: jaubourg Date: Mon, 11 Jun 2012 13:59:34 +0200 Subject: Some work to modularize ajax later on. --- src/manipulation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/manipulation.js b/src/manipulation.js index e53daa9b6..82823e578 100644 --- a/src/manipulation.js +++ b/src/manipulation.js @@ -340,14 +340,14 @@ jQuery.fn.extend({ if ( scripts.length ) { jQuery.each( scripts, function( i, elem ) { if ( elem.src ) { - jQuery.ajax({ + jQuery.ajax ? jQuery.ajax({ url: elem.src, type: "GET", dataType: "script", async: false, global: false, throws: true - }); + }) : jQuery.error( "no ajax" ); } else { jQuery.globalEval( ( elem.text || elem.textContent || elem.innerHTML || "" ).replace( rcleanScript, "" ) ); } -- cgit v1.2.3