Hi
I want to start using the jQuery JavaScript Framework for extra functionality on my site. There is a core JS file that I will reference in the head of my parse file and a small JS files for each of the plugins/modules (e.g. Date Picker, image pop-up, image slideshow etc) . However, I will only need these additional JS files on certain pages (Some pages will need 2 or 3, and others will need just 1 or 2 - basically lots of different combinations). I therefore would like to only call in these JS files on the pages that actually need them. Is there a way I can do this? Is there perhaps an option for JS files like the customised CSS design area option?
I am using version 3.10.3 btw.
Thanks
Mike
There isn't an option for JS files like CSS files, no.
If there are set combinations for each type of page, you could create a new asset type that inserts the correct JavaScript file into the header of each page, perhaps. I haven't really looked at this framework before, so I'm not sure how easy it would be.
Alternatively, you could fund the development of such a feature into the design system. 
What do you mean an new asset type? Please can you give me some more info regarding this or let me know where I can find out more.
As for funding this as feature development - you clearly haven't met my accountant :D
Thank Avi.
Mike
[quote]What do you mean an new asset type? Please can you give me some more info regarding this or let me know where I can find out more.
[right][post=“13153”]<{POST_SNAPBACK}>[/post][/right][/quote]
Well, I’m not that familiar with the JavaScript library itself, so I’m not sure how each script is used. However, there is functionality already in Matrix that allows an asset to insert HTML into the <head> block of the design (used particularly by the calendar to insert our calendar CSS and JavaScript). You could create custom assets that automatically insert your JavaScript files. Creating a custom asset requires PHP development skills, which is why I said you should get us to do it for you. 
Alternatively, you could just use a Raw HTML bodycopy and insert them into the HTML manually.
You can create a Standard Page asset with 3 bodycopy DIVs (Raw HTML type), and create 3 text files with the javascript in it.
In each bodycopy div, you insert the following code
replace xxx with the 3 assetids.
Then you can just create new link to the Page Content when you want to include any of the javascript. This method is particularly good because you can change the location of the JS file, and Matrix can still work out the correct webpath by replacing the './?a=' link, and this also gives you a better control if you want to change things in the future.
Again, this is a manual way to do things, for a more automated way, like Avi said, you will have to contact your account manager at Squiz to arrange for custom development.