I store Javascript files in a folder called /javascript inside the public directory where your bootstrap file is. Your javascript files must be in this directory because they must be readable by the web browser.
If I only want to use Javascipt code for a specific page, I include it inline inside my template file (ex: index.phtml) at the top.
|