Some work to modularize ajax later on.

This commit is contained in:
jaubourg
2012-06-11 13:59:34 +02:00
parent 5f35b3d9f9
commit ac48a19b92
7 changed files with 66 additions and 83 deletions

View File

@@ -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, "" ) );
}