Joomla $document->addScriptDeclaration to add after body
Is there a way I can load a script at the end of the body tag instead of loading in the header? I want to load Facebox and load the jscipt calls t开发者_JS百科o it after the body has loaded.
Despite what jdog wrote, there are a number of ways to take content just before Joomla echoes it to the browser and edit it. This article gives a good overview: http://www.howtojoomla.net/how-tos/development/how-to-fix-joomla-content-plugins
The specific example turns strings into links, but you can modify that to insert your markup right before the </body>
tag.
no.
I assume you want to do this for website load speed reasons, what you could do is look at CSS/JS compression components, such as JFinalizer and see which of those support deferred loading of Javascript.
精彩评论