Skip to content

Instantly share code, notes, and snippets.

@fredleblanc
Created December 7, 2012 14:11
Show Gist options
  • Save fredleblanc/4233488 to your computer and use it in GitHub Desktop.
Save fredleblanc/4233488 to your computer and use it in GitHub Desktop.
Touch Stuff
// bindEvents
// binds all applicable events
bindEvents: function() {
var self = $(this),
settings = self.data("slideshow");
settings.stage
.find(".thumbs")
.on("click", "img", function() {
var index = settings.stage.find(".thumbs img").index($(this));
methods.select.apply(self, [index]);
})
.on("touchstart", "img", function() {
var index = settings.stage.find(".thumbs img").index($(this));
methods.select.apply(self, [index]);
return false;
});
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment