Forum Discussion
Hi Becky,
Indeed, the code above was taken directly from here on the Lithosphere. A few of our customers have implemented similar customizations, and their exact code may differ slightly depending on their needs.
Regards,
Adam
- Beryllium12 years agoAce
Where do people put this javascript? I copied it and put it in a <script> tag but I got errrors:
Any ideas?
- AdamN12 years agoKhoros Oracle
If you're working with a custom component, I'd suggest putting JavaScript snippets in the @liaAddScript macro. This will place the script near the end of the page so that it loads after all of the core libraries. What's likely happening is that the code you added is trying to use the jQuery methods before it's been setup.
Here's an example of using @liaAddScript:
- Beryllium12 years agoAce
Thank you, that seems to have taken care of the error and your suspiciouns were correct indeed. Now I get another error instead ...
- Uncaught Cannot find tooltip for [object Object] lia-scripts-body-min.js:83
- Tooltip.$.extend.showlia-scripts-body-min.js:83
- (anonymous function)lia-scripts-body-min.js:81
- jQuery.event.special.(anonymous function).handlelia-scripts-common-min.js:203
- jQuery.event.dispatchlia-scripts-common-min.js:183
- elemData.handle.eventHandle
Related Content
- 9 months ago
- 12 months ago
- 2 years ago