This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery.cargaScript = function( url, options ) { | |
// Allow user to set any option except for dataType, cache, and url | |
options = $.extend( options || {}, { | |
dataType: "script", | |
cache: true, | |
url: url | |
}); | |
// Use $.ajax() since it is more flexible than $.getScript | |
// Return the jqXHR object so we can chain callbacks | |
return jQuery.ajax( options ); |