Forum Discussion
5 Replies
Sort By
Depends what its for really? The theme wrappers include a hitbox area for analytics tracking for example, you might consider putting it here. Or it could be included and uploaded to html/assets.
- HaidongG11 years agoLithium Alumni (Retired)
agree with cblown , it really depends what is the JavaScript usage. you can add it with hitbox, skin wrappers directly or upload to html/assets with a reference from skin wrapper.
It's just a piece of code that selects an option for a dropdown as default.
Thanks for your replyHi guys,
I think I'm ready with my research here. What I endep doing is using a Custom Content module with some Javascript specific to the type of page I was looking for.
Gracias,
Luis
- Your reply doesn't seem related to the question of adding JS in a Lithium environment. Although browser developer tools' JS console can be really useful debugging in particular the drupal function reference seems off place here.
On Lithium it's best practice to use the @liaAddScript directive in the hitbox area of the wrapper. More information here:
http://community.lithium.com/t5/Developers-Knowledge-Base/Adding-JavaScript-to-components-with-liaAddScript/ta-p/197594
Related Content
- 10 years ago
- 5 years ago
- 2 years ago