Modules Introduction

Grid Accordion has a modular architecture. It consists of a core and several optional modules. The advantage of modular architecture is that it allows you to only load the code you need and leave out what you don't need, resulting in a smaller file size for the script and, theoretically, better performance, although, practically, the performance impact is not noticeable even if you load all the modules. There are also advantages for developers, because the plugin is easier to extend and maintain.

The jquery.gridAccordion.js file (and its minified version, jquery.gridAccordion.min.js) from the 'dist' folder includes all the modules, so that you can have quick and easy access to all the available features. However, if you would like to build a custom file, and you're familiar enough with JavaScript, please see the 'Building a custom file' chapter. Even if you don't want to construct a custom file, please go through the 'Modules presentation' chapter in order to learn how to use the Grid Accordion's features.

Building a custom file

You can find all the modules, in separate files, in the 'src/js' folder. What you need to do is copy the code from those files in a separate file, starting with the jquery.gridAccordion.core.js file. It's important that the jquery.gridAccordion.core.js code is the first block of code in your script. The order of the optional modules is not important. After you have created your script, you can obtain a minified version by using Google's Closure Compiler .

Have more questions? Submit a request


Article is closed for comments.
Powered by Zendesk