Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Themes /

Discuss SilverStripe Themes.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

how can I merge Javascript code

Go to End

2 Posts   2331 Views


Community Member, 19 Posts

1 July 2009 at 9:03pm

Edited: 01/07/2009 11:06pm


I want to build a simple moseover and mouseout function into my navi (grafik-elements).
I have uploaded a code in: mysite->javascript->my.js -- (I tried it out already at a simple HTML file) --

then I inserted the following code in my head :

function init(){

hm? did i forget something.
thanks in advance. m.


Forum Moderator, 5521 Posts

2 July 2009 at 12:03pm

Merge? You mean insert JS code into the page?. That should be all you need to do to include the JS on the page.

If you want to merge multiple JS files into 1 and include that you do

Requirements::combine_files('output.js', array('file1.js', 'file2.js'));