I'm trying to figure out how to use the touchSwipe plugin to make it affect only one element.
<div class="element">Content 1 <p class="hello">Hello</p></div>
<div class="element">Content 2 <p class="hello">Hello</p></div>
<div class="element">Content 3 <p class="hello">Hello</p></div>
My jQuery goes like this:
$('.element').each(function() {
$(this).swipe({
swipeLeft: function() { $(this).find('.hello').fadeOut(300) }
});
});
Problem is this doesn't work (actually, nothing happens, but swipeLeft is recognized).
The effect I want basically is that if I swipe left on the div that has content 1, only its "Hello" should fade out.