5099 Posts in 1519 Topics by 1116 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 886 Views |
-
Javascript location

18 March 2009 at 3:37am
Hi all,
Just started working with SIlverStripe and am quite impressed so far. Great job all of you!
I had a quick question (I am sure on of many), is it possible to change the location that the Requirements class places JavaScript files? I am loading jQuery and the jQuery corners plugin, but currently it is placing the <script> tags just before the </body> tag.
It would be nice if I could move them to be rendered inside the <head> tags instead. Is this do-able?
Many thanks,
Mo
-
Re: Javascript location

19 March 2009 at 12:42am Last edited: 19 March 2009 12:42am
Hi.
You can disable writing all javascripts to the body and include them in the head by setting this in your mysite/_config file :
Requirements::set_write_js_to_body(false);
Cheers,
Christian
| 886 Views | ||
|
Page:
1
|
Go to Top |


