Skip to content

Instantly share code, notes, and snippets.



View GitHub Profile
View codigo
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 );
You can’t perform that action at this time.