In a Zurb template project, I have some pages that I would like to invoke a little jQuery on (responding to a click of a button on that page, for example).
Normally, I would include jquery in the head and then write a script block:
However, using the Foundation Zurb template throws a bit of a wrinkle in here (because of web pack, I presume). Although I could put all my jquery code into my app.js, it seems odd to fill the app.js up with snippets of code for individual pages. On the other hand, I cannot get to $ otherwise, unless I also load jquery on the page. But this seems odd since now I would clearly have two jquery loads (one packed into Foundation/app.js, the other on the page itself) - if I understand correctly.
So, my question boils down to:
I want to write a jquery snippet on a single page without putting my snippet into app.js. What is the best way to do this?
For example, Abide. It seems odd to be forced to put my Abide handler in app.js when I only need it on a form page.
Thank you for your help.