0
私はtouchSwipeプラグインを使って1つの要素にしか影響を与えない方法を見つけようとしています。
<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>
私のjQueryのは、このように書きます:
$('.element').each(function() {
$(this).swipe({
swipeLeft: function() { $(this).find('.hello').fadeOut(300) }
});
});
問題は、これは(実際には、何も起こりませんが、swipeLeftが認識されている)は動作しませんです。
私が基本的に望む効果は、コンテンツ1を持つdivに左にスワイプすると、その「こんにちは」だけがフェードアウトすることです。