Forum Discussion
marco55
7 years agoGenius
If I'm understanding what you're going for, another option might be to include the asset through js with $(document).ready(), it should load after jquery.
<@liaAddScript> ; //optional js $(document).ready( function () { var my_script = document.createElement("script"); my_script.setAttribute("src","[asset_path]"); my_script.setAttribute( "type", "text/javascript" ); document.head.appendChild(my_script); } ); })(LITHIUM.jQuery); </@liaAddScript>
marco55
7 years agoGenius
Yikes, sorry, I posted the syntax wrong...corrected:
<@liaAddScript> ;(function($) { //optional js $(document).ready( function () { var my_script = document.createElement("script"); my_script.setAttribute("src","[asset_path]"); my_script.setAttribute( "type", "text/javascript" ); document.head.appendChild(my_script); } ); })(LITHIUM.jQuery);
</@liaAddScript>
Related Content
- 14 years ago
- 12 years ago
- 11 years ago