qTip2 - Pretty powerful tooltips
If you're not interested in compiling your own version of qTip2, you can grab the pre-compiled scripts from the dist directory and get started quickly. If you want more options over what plugins are included in your build, take a look below.
What you need to build qTip2
- *nix make or Apache Ant
- Java Runtime Environment (If you wish to build minified sources or use JSLint check)
How to build qTip2 (using MAKE)
In the main directory of the distribution (the one that this file is in), type the following to build qTip2 and its accompanying CSS:
You can also create each individually using these commands:
make qtip # Build non-minified qTip2 source make css # Build CSS files make min # Build minified source and css make pack # Build minified and packed qTip2 source (Smallest filesize!)
To build and test the source code against JSLint type this:
Finally, you can remove all the built files using the command:
How to build qTip2 (Using ANT)
For those of you without access to *nix make, an ANT build file is also included in the repository. Build instructions are identical to those above, but replace make with ant e.g.
[command] is optional and can be any of the above i.e. qtip, min, pack etc.
Building to a different directory (MAKE only)
If you want to build qTip2 to a directory that is different from the default location, you can...
make PREFIX=/home/craig/qtip2/ [command]
With this, the output files would be contained in
[command] is optional.
Choosing which features are included in your build (MAKE only)
By default qTip2 is built with all plugins built into the file. You can see an example of this in the dist directory files. If you want more control over what plugins are included, you can do so by adding some extra parameters to your build commands.
For example, if you plan on using only the tips plugin, you'd specify the plugins variable as so:
make PLUGINS="src/tips.js" all
Notice the only thing that was added was the PLUGINS parameter. This tells the compiler which files to include in the final qTip2 build. You can specify multiple plugins by separating them wit a space:
make PLUGINS="src/tips.js src/ajax.js src/modal.js" all
By default all plugins are included in the build, so the regular
[make all] command is actually equivilent to:
make PLUGINS="src/ajax.js src/tips.js src/imagemap.js src/svg.js src/modal.js src/bgiframe.js" all
- Note: The above was correct at the time of writing. Subsequent revisions may change file names or add new plugins, so checkout the Makefile for a full up-to-date list of all plugins*
Questions or problems?
If you have any questions, please feel free to post on the support forums: http://craigsworks.com/projects/forums
Big shout-out to the jQuery team for providing the directory structure and base files for the git repo!