modX::regClientScript
Register JavaScript to be injected before the closing BODY tag.
Syntax
API Doc: http://api.modxcms.com/modx/modX.html#regClientScript
void regClientScript (string $src, [boolean $plaintext = false])
Example
Add some JS to the end of the page.
$modx->regClientScript('assets/js/footer.js');