Including custom JS into a block
Permalink
AndyJ did a great HowTo on adding an accordion to the autonav block. Unfortuntaley he skated over the bit about ensuring the custom JS file got loaded bys simply saying
<quote>
If all of the files are loaded to the relevant places and the new menu.js (containing the amended javascript) is called into our page then we now have a sliding accordion style navigation menu.
</quote>
OK, so how do I ensure the custom menu.js file gets included wherever the block is called?
<quote>
If all of the files are loaded to the relevant places and the new menu.js (containing the amended javascript) is called into our page then we now have a sliding accordion style navigation menu.
</quote>
OK, so how do I ensure the custom menu.js file gets included wherever the block is called?
put it in a file called view.js
Thanks
Where do I put the file view.js?
I know these are simple questions for you experts but I'm not an expert.
Gareth
Where do I put the file view.js?
I know these are simple questions for you experts but I'm not an expert.
Gareth
In the folder that the block or custom template is.
Hey, i was working with the same HoWto from AndyJ and was wondering where do i find this javascript file? Im assuming that im supposed to have a javascript file which i have to edit/rename. But i have no clue which javascript to use, the one that is available through the original autonav menu (auto.js) doesnt have the quoted line that im supposed to edit.
Please help me!
Gr.
p.s. here is the original howto:http://www.concrete5.org/documentation/how-tos/developers/adding-a-...
Please help me!
Gr.
p.s. here is the original howto:http://www.concrete5.org/documentation/how-tos/developers/adding-a-...