Actions

CodeExample

4bcfd994b6e12

From Joomla! Documentation

Revision as of 00:07, 22 April 2010 by Chris Davenport (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A typical example of loading MooTools

// This example depends on mootools
JHTML::_('behavior.mootools');
 
// Do something after page has loaded
$document =& JFactory::getDocument();
$document->addScriptDeclaration("window.addEvent('load', function() { doSomething(); })");

SeeAlso:JDocument/addScriptDeclaration

Chris Davenport 01:07, 22 April 2010 (EDT) Edit comment