Code: Select all
$document->addScript('path/to/file.js');
//and the wrapper
JHtml::script('file.js','path/to/');
Code: Select all
JHtml::('mootools-more.js;' , 'path/to/', 1);
JHtml::('mootools-core.js;' , 'path/to/', 0);
JHtml::('dbug.js;' , 'path/to/',2);
// thus writing:
// mootools-core.js
// mootools-more.js
// dbug.js