Leave a Comment
Отложенная загрузка скрипта в jQuery
function cachedScript (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);
}
(чтобы скрипт кэшировался)
http://jqapi.com/#p=jQuery.getScript
LEAVE A COMMENT
Для отправки комментария вам необходимо авторизоваться.