3.3.2.7. Implementing a global jQuery plugin

There are a few ways to implement the usage of a global jQuery plugin. However,
make sure that the global jQuery is available before the global jQuery plugin is loaded.

As you have seen before how you can scope a module to a portlet, the module will be loaded when the
portlet
is
on a
page using the
PORTLET
scope. Accordingly, use the PORTAL scrope instead of PORTLET. The main difference is that the loading of your plugin will be triggered on a specific site instead of
a
specific portlet.

Create the jQuery plugin as a script named
myPlugin.js
and integrate it to your plugin: