Sie sind auf Seite 1von 13

jQuery Easy v1.4.

0
Install the plugin through the extension manager. It will update itself if the plugin has been previously installed. In case of an update, make sure you read the changes that have been made and are aware of potential backward compatibility issues. Note: in Joomla! 1.5, the plugin needs to be un-installed before it can be updated.

1|Page

Using the plugin


Go to the menu Extensions -> Plugin Manager. Select the system type to narrow down the list of available plugins. Enable the System jQuery Easy plugin. Select it to access its options.

2|Page

The list of options


Here is the list of available parameters for the plugin. Note: Front or Frontend is the terminology used to represent your website. Back and Backend represent the administrative side of your site (the Joomla! administration).

Basic options

3|Page

Option Enable jQuery

Description Enable jQuery on the website (disabled by default). If jQuery UI is not already present on your site, you probably dont need it Set the version of jQuery to use (from the Google CDN, framework (Joomla! v3.0 only)

Front X

Back X

jQuery Version

or locally). For every major version, it loads the latest release automatically (when using the Content Delivery Network) The optional explicit jQuery version number (does not apply to local files)

jQuery Sub-Version

Example: 2 (the 2 in 1.7.2) When using the option custom/local, set the path to the local file (path including the

Local Version Path

file name). Example: /libraries/jquery/v1.7/jquery.min.js Set the version of jQuery UI to use (from the Google CDN, framework (Joomla! v3.0

jQuery UI Version

only) or locally). For every major version, it loads the latest release automatically (when using the CDN) The optional explicit jQuery UI version number (does not apply to local files)

jQuery UI Sub-Version

Example: 21 (the 21 in 1.8.21) When using the option custom/local, set the path to the local file (path including the file name)

Local Version Path

The jQuery UI file can be the full blown library or a custom one created at the jQuery UI website http://jqueryui.com/download Example: /libraries/jquery-ui/v1.8/jquery-ui-custom.min.js

Theme

Set the UI theme that will be used in conjunction with jQuery UI. Some custom jQuery UI libraries may not need a theme. The path to the local or custom CSS file used for jQuery UI (path including the file name).

Custom/Local Theme Path

Typically, you would have a sub-directory images/ containing the themes images. The jQuery UI css file can be a full blown theme or a custom one created at the jQuery UI theme roller website http://jqueryui.com/themeroller/ Example: /libraries/jquery-ui/v1.8/jquery-ui.css X X

Protocol

Set the protocol that will be used to load the libraries (http or https). HTTPS may be required on specifically secured sites. Load the jQuery and jQuery UI libraries compressed or not. The minified option is

Libraries

selected by default (best loading times). The un-compressed libraries would be mostly used for jQuery debugging.

Preview

A preview of jQuery and jQuery UIs simple test in order to make sure jQuery and/or jQuery UI libraries are loaded correctly, alongside the jQuery UI theme

4|Page

Most of the times you wont need to use jQuery in the backend If your administration console gets unresponsive for any reason after enabling jQuery, you will need to access your database and disable the plugin from the extensions table. UPDATE `mydatabasename`.`mytableprefix_extensions` SET `enabled` = '0' WHERE `mytableprefix_extensions`.`element` = "jqueryeasy";

Backend features are not available for Joomla! 3.0

5|Page

Notes: The Googles CDN server is optimized and will most likely have better loading times than having the libraries located on your websites server (it will depend on how efficient is your Internet Service Provider mostly). The only way to find out which server results in fastest loading times is by testing the 2 cases. The removal of the jQuery libraries is limited to the ones found in a script tag. The removal of the stylesheets is limited to the ones found in a link tag. Using sub-versions is useful for caching the library files for a year and therefore optimize website loading times. Please check this link for more information: http://blog.bucketsoft.com/2012/03/maximize-your-chances-of-caching-your.html The local library files could be arranged on your server in the following manner:

6|Page

Advanced options for expert users

7|Page

Option

Description Enable the plugin in the pages listed only (one path per line). Examples:

Front

Back

Enable only in pages(a)

/contact (will match that page only) */product (will match all pages containing /product)

Plugin

/ (will match the home page only) Disable the plugin in the pages listed only (one path per line). Examples: Disable in pages(a) /downloads (will match that page only) */product (will match all pages containing /product) / (will match the home page only) Get rid of the scripts that have not been automatically removed by the plugin but still need to be stripped out (one path per line). The path is the content of the src attribute Strip remaining scripts of the script tag. Example: /js/unwanted_script.js Get rid of the stylesheets that have not been automatically removed by the plugin but still need to be stripped out (one path per line). The path is the content of the href Strip remaining CSS attribute of the link tag. Example: /css/unwanted_stylesheet.css Get rid of all jQuery.noConflict(); and $.noConflict(); code (enabled Strip no conflict code by default) Takes care of jQuery.noConflict(true) and $.noConflict(true) also. When found, the whole script line is removed. Add the jQuery.noConflict(); code (from the jquerynoconflict.js file by Add no conflict code default). It can be added through script declaration, but adding the file instead ensures it is called right after the jQuery library is loaded. Fix document ready Replaces all $(document).ready(function() with jQuery(document).ready(function($) Will disable the MooTools libraries following a set of rules for safe removal(b) DISABLE AT YOUR OWN RISK When MooTools is disabled, it can still be enabled in the pages listed (one path per line). X X X X X X X X X X X X

jQuery

Disable when possible

MooTools Keep in pages

Examples: /fitness (will match that page only) */product (will match all pages containing /product) / (will match the home page only) X

8|Page

Option Disable Captions

Description Gets rid of caption.js (that usually loads alongside the MooTools libraries) which will remove image captions. Enable it to improve loading times. Removes the blank lines created by the plugins cleaning. Disabled by default because it may slow down the loading of long pages. Add javascripts (one path per line)

Front X

Back

Strip blank lines

Add scripts (d)

Example: http://www.mysite.com/tidi.js

Other(c)

Add script declarations (d)

Add javascript declarations Example: var myVar = jQuery.noConflict(); Add CSS stylesheets (one path per line) X X

Add styles (d)

Example: http://www.mysite.com/tidi.css

Add style declarations (d)

Add CSS styles Example: div span { font-size: 20px; } X X

(a) use one or the other but not both options (b) MooTools libraries are disabled: WHEN no other library using MooTools is loaded from '/media/system/js' (won't be deleted if using mootree.js for instance) AND if there is no edition of articles, weblinks (MooTools is needed for article saving for instance) i.e. when view!= form AND if component.php is not in use (MooTools is needed to import images for instance) i.e. when tmpl != component AND we are not in the pages specified in keep in pages (c) These options are available when the plugin is enabled, independently of jQuery being enabled or not (d) Scripts and stylesheets are added after all the plugins changes and before the removal of blank lines. So the scripts ca n contain any jQuery code without the risk of being removed by the plugin. Moreover, the script declarations are added in front of any other script declaration.

9|Page

10 | P a g e

Help
Reporting has been added to version 1.3.0 to make it easier to understand what the plugin does in the background and to help in finding out potential issues. The report is located at the bottom of the page that is viewed.

11 | P a g e

Example of a report:

12 | P a g e

Additional information
Although jQuery Easy can solve a certain number of jQuery issues (code conflicts, multiple jQuery libraries load...), some problems can still occur. These problems can come from different sources:

some components installed are not compatible with the version of jQuery you set through the plugin, some jQuery code may need to be modified, ...

More information can be found at: Using jQuery with other libraries jQuery no conflict API Solving jQuery/jQuery and jQuery/MooTools conflict issues with the jQuery Easy plugin Solving jQuery issues with jQuery Easy: a case study DISABLE MOOTOOLS AT YOUR OWN RISK If you disable MooTools you may break some features (search filters functionality and frontend article submission for instance). If your Joomla! website does not use MooTools, you will benefit from disabling it:

It will increase the page load speed by removing un-needed javascript code, It will eliminate conflicts between MooTools and jQuery.

Visit the forum at http://www.simplifyyourweb.com/index.php/forum/19-jquery-easy for additional support.

13 | P a g e

Das könnte Ihnen auch gefallen