where would I add jQuery script tags for templates? I get an error if I add them to the template.js page. For example, where would i go about adding a mouseover function?
Thanks!
where would I add jQuery script tags for templates? I get an error if I add them to the template.js page. For example, where would i go about adding a mouseover function?
Thanks!
To add client-side, place it in project_name/public
To add plugin, run
Meteor add jquery
For further information checkout this answer
The 'meteor' place to attach events is in Template.myTemplate.events
(docs) but you can also run arbitrary jQuery in Template.myTemplate.onRendered = function(){ //code here}
. (docs)
These can go in the template's js file.
If you haven't removed jQuery, you don't need to add it, it's there by default.
Generally you don't need to add script tags anywhere.