Skip to content

Instantly share code, notes, and snippets.

View douglasmiller's full-sized avatar

Douglas Miller douglasmiller

View GitHub Profile
@douglasmiller
douglasmiller / gist:4170907
Created November 29, 2012 18:18 — forked from stovak/gist:1343996
Touch events for jQuery Cycle
Drupal.settings.isTouchDevice = function() {
return "ontouchstart" in window;
}
if ( Drupal.settings.isTouchDevice() ) {
Drupal.behaviors.jQueryMobileSlideShowTouchAdvance = {
attach: function(context, settings) {
self = Drupal.behaviors.jQueryMobileSlideShowTouchAdvance;
jQuery.each(jQuery(".views_slideshow_cycle_main.viewsSlideshowCycle-processed"), function(idx, value) {
value.addEventListener("touchstart", self.handleTouchStart);