Patrick Thornton
Patrick Thornton

Reputation: 13

Swipe gestures for mobile website

I'm looking to create swipe gestures for this mobile website prototype I'm working on: http://patthorntonfiles.com/snk_mobile/

The idea is that when you swipe left across a story on the homepage, four icons would appear: email story, Facebook, Twitter and like. If you've used Sparrow for the iPhone, I'm looking for a very similar gesture. I'm looking for a standards-based way to do this. The prototype already uses jQuery for some other parts.

Any help would be much appreciated. Thanks.

Upvotes: 1

Views: 2673

Answers (1)

Devin M
Devin M

Reputation: 539

I'm not sure what you're looking for but search for JS Swipe Libraries. I just used HammerJS on my last project.

Javascript example:

var hammer = new Hammer(document.getElementById("news_article"));
hammer.ondragend = function(ev) {
    $('.icons').fadeIn();
};

Upvotes: 1

Related Questions