jRequire is meant for developers wanting to use AMD-style JavaScript development. We encourage developers to bundle this extension with their extensions in the hope that it serves as a standard way of integrating require.js in Joomla.

So how to use it?

With library and plugin installed you make a call like this:

Jrequire::addModuleCall($moduleId, $method);

$moduleId is the path to your AMD module. Say you have a JS file in


then your $moduleId is media/com_example/js/example.

$method is the name of a method in your AMD module. Once the JS is loaded, the method gets called. You can leave $method empty if you just want to load the module.

Other infos

  • We use require.js 2.3.5 and update shortly after any updates
  • We dual-license: you choose to get a copy under the MIT or GPLv3 license.

Download version 1.0.0

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.