Skip to content

Instantly share code, notes, and snippets.

@copyninja
Created September 25, 2010 18:26
Show Gist options
  • Save copyninja/597123 to your computer and use it in GitHub Desktop.
Save copyninja/597123 to your computer and use it in GitHub Desktop.
$("head").append("<style>;");
var style = $("head").children(":last");
style.attr({
type: "text/css"
});
for(var index in fonts){
var font = fonts[index];
var font_details = resultobj[font];
var css_link = pathname + "?font="+font;
$("head").append("<link>");
css = $("head").children(":last");
css.attr({
rel: "stylesheet",
type: "text/css",
href: css_link
});
style.append("."+ font +"{ font-family:"+ font +",sans; font-size: 16px;}");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment