Jump to main content Jump to doc navigation

modX.regClientScript

Other versions: 3.x — Found a problem? Please edit this page or report an issue.

modX::regClientScript

Register JavaScript to be injected before the closing BODY tag.

Syntax

API Doc: http://api.modx.com/revolution/2.2/db_core_model_modx_modx.class.html#%5CmodX::regClientScript()

void regClientScript (string $src, [boolean $plaintext = false])

Example

Add some JS to the end of the page.

$modx->regClientScript('assets/js/footer.js');

See Also