Plugins

The plugins site is currently in development.

We've been looking to provide a higher-quality, spam-free experience at the plugins site for some time, and a major error on our part forced us to shut down the current site before we could put the new one in place. We are developing a new site, and you can follow along with its development on GitHub. For more information about this transition, including steps you can take as a plugin author to prepare, please read our post about what's going on.

flick


jFlick

jFlick is a jQuery extension that captures the flick/swipe gestures for Droids/iPhones/etc and lets you write custom handlers to deal with them. By default the X-axis is evaluated, with a threshold of 15 pixels to a swipe, and just returns true if a flick is detected. The threshold of 15 will capture almost everything as a flick except a stationary tap.

Parameters

The only method is detectFlicks and it will accept these override values:

  • axis: x or y
  • threshold: some positive number
  • flickEvent: any function

For the flickEvent, the data object passed to it will contain the variable ''direction'' which is a string detailing which direction the flick was in.

Example


$('div#flickable')
.detectFlicks({
axis: 'y',
threshold: 60,
flickEvent: function(d) { alert('flick detected: ' + d.direction);