modX.regClientStartupScript

Skip to end of metadata
Go to start of metadata


modX::regClientStartupScript

Register JavaScript to be injected inside the HEAD tag of a resource.

Syntax

API Doc: http://api.modxcms.com/modx/modX.html#regClientStartupScript

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

Example

Register some JS to the start of the page:

$modx->regClientStartupScript('assets/js/onload.js');

See Also

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.