It looks like you're new here. If you want to get involved, click one of these buttons!
leafboxtea
newb
<script type="text/javascript" src="http://use.typekit.com/tlo4aer.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
Comments
<head>
{asset name='Head'}
<div><script type="text/javascript" src="http://use.typekit.com/tlo4aer.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script></div>
</head>
I also tried it without the div tag and it still broke. Is this the right place/method for it?
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Vanilla with Typekit fonts in place.... http://leafboxtea.com/discuss
Now, if I can just convince someone to write a plugin to to insert the code into the head it would be even easier http://vanillaforums.org/discussion/14415/plugin-request-typekit-fonts
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •public function Base_Render_Before(&$Sender)
{
// Your JS Code...
$JavaScript = '
<script type="text/javascript">
document.onclick = alert("you clicked");
</script>';
// Send it to the Header of the page
$Sender->Head->AddString($JavaScript);
}
But one question to @Mark regarding this: if I have a couple plugins that add JS to the page - is it possible to kind of "merge" them in one
<script></script>-element? Multiple plugins means now f.eg. multiple jQuery ready.functions. It works, but doesn't look too pretty...- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •A tidier solution is to just put all of your js into it's own file, and include that. Of course people who like to have less includes would balk at that, but it is more visually pleasing to nerds like me who like to read html code :)
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •