开发者

Joomla $document->addScriptDeclaration to add after body

开发者 https://www.devze.com 2023-03-17 04:20 出处:网络
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 wh

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消