That page was written for modules and I know - from bitter, frustrating experience - that there are variations that trip you up. As far as I can tell, you don't get any of that required stuff in the themes that you do in other plugins. It appears just to pull in the file that you ask it to - *appears* to....
So... if you don't (appear to) have the equivalent of M.mod_mymod.init_something, how does one actually initialise the script?
js_init_call is not used in any of the standard themes as far as I can see.
The theme wiki page makes no mention of that, it says to use $THEME->javascripts_footer to include javascript.
So which is it, or is it optional?
Init!
The toggle in Aardvark Post-IT uses javascript which is written inside a php file and is called into to the header as a php include.
Here's a link that tells you all about how to use jquery in a theme...but I suspect you know about this too!
http://docs.moodle.org/dev/Using_jQuery_with_Moodle_2.0
Oh..and YES it is optional
It turns out I wasn't even asking the right question. I want to use a YUI plugin and that seems to require a completely different approach, using the subtly different requires->yui_module(....) syntax. The 'splash' theme seems to do that but it won't work for me.
Really, I don't know what I'm doing. I have only a sketchy understanding of Javascript and just find YUI a mystery. Sigh!! Back to the docs
Excuse me Mary and Howard but if i going to use javascript in the "region-main" (content of course), what I have to do to view the content of the courses with a javascript accordion ??
Hi,
I'm not familiar with the JS Accordian, although I have seen it in action on a site where the site owner has customised one of my themes. Are there any instructions with this plugin? If indeed it is a plugin? If it is a plugin, then where can I find it so I can test it out?
Cheers
Mary