FAQs

How do I load MooTools in Joomla! 3?

Written
In Joomla! 3 the MooTools JavaScript library is deprecated in favour of JQuery. However ChronoForms v4 still uses MooTools for most of the JavaScript functions. You can still load MooTools where you need it.

Loading MooTools on all pages

You can add the following code to the index.php file of your template to load MooTools throughout the site, the code must be inside <?php ?> tags.
To load just the MooTools Core library use:
JHtml::_('behavior.framework');
Or to load both the Core and More libraries:
JHtml::_('behavior.framework', true);

Loading MooTools in a form page

To load MooTools only in pages where a form is used include the same code in a Custom Code action in the form ON Load event:
<?php
JHtml::_('behavior.framework', true);
?>

Loading or disabling MooTools on selected pages

I had a requirement to have MooTools enabled across most of my site but to disable it on a few selected pages where I was developing forms using just jQuery. I found the Mootools Enabler/Disabler plug-in from Roberto Segura which let me enable or disable MooTools depending on Menu Items. It solved my problem very neatly. 

jQuery compatibility

In Joomla! 3 this does not seem to be a problem, jQuery and MooTools will co-exist happily :-)

Loading jQuery & Bootstrap

Just for completeness the equivalent code for loading the JQuery library is 
JHtml::_('jquery.framework');
For jQuery UI
JHtml::_('jquery.ui');
and for BootStrap
JHtml::_('bootstrap.framework');
Please see the Joomla! documents here for more information.