Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

qTip2 - Pretty powerful tooltips

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.md

qTip2 - Pretty powerful tooltips

Pre-compiled scripts

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

In order to build qTip, you need to have GNU make 3.8 or later, Node.js 0.2 or later, and git 1.7 or later. (Earlier versions might work OK, but are not tested.)

Windows users have two options:

  1. Install msysgit (Full installer for official Git), GNU make for Windows, and a binary version of Node.js. Make sure all three packages are installed to the same location (by default, this is C:\Program Files\Git).
  2. Install Cygwin (make sure you install the git, make, and which packages), then either follow the Node.js build instructions or install the binary version of Node.js.

Linux/BSD users should use their appropriate package managers to install make, git, and node, or build from source if you swing that way. Easy-peasy.

Mac OS users should install Xcode (comes on your Mac OS install DVD, or downloadable from Apple's Xcode site) and http://mxcl.github.com/homebrew/. Once Homebrew is installed, run brew install git to install git, and brew install node to install Node.js.

How to build qTip2

First, clone a copy of the main qTip2 git repo by running git clone git://github.com/Craga89/qTip2.git.

Then, in the main directory of the distribution (the one that this file is in), type the following to build qTip2 and its accompanying CSS:

make

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 JS and CSS
make pack       # Build minified and packed qTip2 JS (smallest filesize!)

To build and test the source code against JSLint type this:

make lint

Finally, you can remove all the built files using the command:

make clean

Building to a different directory

If you want to build qTip2 to a directory that is different from the default location, you can specify the PREFIX directory: make PREFIX=/home/craig/qtip/ [command]

With this example, the output files would end up in /home/craig/qtip/dist/.

Choosing which features are included in your qTip2 build

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" [command]

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" [command]

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" [command]
  • 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

Special thanks

Big shout-out to the jQuery team for providing the directory structure and base files for the git repo, as well as the base-files for the new NodeJS build system!

Something went wrong with that request. Please try again.