Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
An implementation of $.getScript but for stylesheets. Call it $.getStylesheet
(function($) {
$.getStylesheet = function (href) {
var $d = $.Deferred();
var $link = $('<link/>', {
rel: 'stylesheet',
type: 'text/css',
href: href
return $d.promise();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment