Actions

J2.5

Difference between revisions of "Working with Mootools 1.3"

From Joomla! Documentation

(Differences to Mootools 1.1/1.2)
m (Hutchy68 moved page Working with Mootools 1.3 to J2.5:Working with Mootools 1.3: version namespacing)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{JVer|1.6}}
+
{{version|2.5}}
  
Joomla 1.6.0 includes Mootools Core 1.3 and Mootools More 1.3.0.1 including all it's modules.
+
MooTools is Joomla's standard Javascript framework. It provides a more object oriented approach to JavaScript.
  
=How to use Mootools=
+
*Joomla 1.6.0 and newer include MooTools Core 1.3 and MooTools More 1.3.0.1 including all its modules.
 +
*Joomla 1.7.0 and newer include MooTools Core 1.3.2 and MooTools More 1.3.2.1 including all its modules.
 +
 
 +
==How to use Mootools==
 
If your extension uses Mootools you can use the following code to include the framework in Joomla's output.
 
If your extension uses Mootools you can use the following code to include the framework in Joomla's output.
  
Line 16: Line 19:
 
</source>
 
</source>
  
=Differences to Mootools 1.1/1.2=
+
==Differences to Mootools 1.1/1.2==
 
Many old functions have been removed or renamed in Mootools 1.3. Thanks to the compatibility module they still work fine in Joomla 1.6, however a future version of Joomla is likely to remove the compatibility module. It is recommended to follow the Mootools' [https://github.com/mootools/mootools-core/wiki/Upgrade-from-1.2-to-1.3 Upgrade from 1.2 to 1.3] guide to future proof your code.
 
Many old functions have been removed or renamed in Mootools 1.3. Thanks to the compatibility module they still work fine in Joomla 1.6, however a future version of Joomla is likely to remove the compatibility module. It is recommended to follow the Mootools' [https://github.com/mootools/mootools-core/wiki/Upgrade-from-1.2-to-1.3 Upgrade from 1.2 to 1.3] guide to future proof your code.
  
Also new in Mootools 1.3 id, that the $() function is deprecated. Instead document.id() should be used.
+
Also new in Mootools 1.3 is, that the $() function is deprecated. Instead document.id() should be used. This will help when other JavaScript frameworks are mixed with Mootools code.
  
=More information=
+
==More information==
 
You can find more information, examples and Mootools plug-ins on the [http://mootools.net/ Mootools Homepage].
 
You can find more information, examples and Mootools plug-ins on the [http://mootools.net/ Mootools Homepage].
  
 +
<noinclude>
 
[[Category:Development]]
 
[[Category:Development]]
[[Category:Joomla! 1.6]]
+
[[Category:Joomla! 2.5]]
 +
</noinclude>

Latest revision as of 17:03, 27 May 2013


MooTools is Joomla's standard Javascript framework. It provides a more object oriented approach to JavaScript.

  • Joomla 1.6.0 and newer include MooTools Core 1.3 and MooTools More 1.3.0.1 including all its modules.
  • Joomla 1.7.0 and newer include MooTools Core 1.3.2 and MooTools More 1.3.2.1 including all its modules.

How to use Mootools

If your extension uses Mootools you can use the following code to include the framework in Joomla's output.

Mootools Core:

JHtml::_('behavior.framework');

Mootools Core and Mootools More:

JHtml::_('behavior.framework', true);

Differences to Mootools 1.1/1.2

Many old functions have been removed or renamed in Mootools 1.3. Thanks to the compatibility module they still work fine in Joomla 1.6, however a future version of Joomla is likely to remove the compatibility module. It is recommended to follow the Mootools' Upgrade from 1.2 to 1.3 guide to future proof your code.

Also new in Mootools 1.3 is, that the $() function is deprecated. Instead document.id() should be used. This will help when other JavaScript frameworks are mixed with Mootools code.

More information

You can find more information, examples and Mootools plug-ins on the Mootools Homepage.