0
jquery.touchSwipeプラグインを使用していますが、今直面している問題が1つあります。jquery.touchSwipe with link
div内にリンクがある場合、そのリンクを開こうとすると機能しませんが、スワイプすると正常に動作します。
以下のコードを確認してください。
$(function() { \t \t \t
\t \t \t \t \t //Enable swiping...
\t \t \t \t \t $("#test").swipe({
\t \t \t \t \t \t //Generic swipe handler for all directions
\t \t \t \t \t \t swipe:function(event, direction, distance, duration, fingerCount, fingerData) {
\t \t \t \t \t \t \t $(this).html("You swiped " + direction+"<br><a href='http://www.google.com/'>google.com</a>"); \t
\t \t \t \t \t \t },
\t \t \t \t \t \t //Default is 75px, set to 0 for demo so any distance triggers swipe
\t \t \t \t \t threshold:0
\t \t \t \t \t });
\t \t \t \t });
.box
{
\t margin-top:20px;
\t margin-bottom:20px;
\t max-width:768px;
\t height:300px;
\t
\t padding: 10px;
\t background-color: #EEE;
\t -webkit-border-radius: 6px;
\t -moz-border-radius: 6px;
\t border-radius: 6px;
\t
\t text-align:center;
\t font-weight: 300;
\t font-size: 20px;
\t line-height: 36px;
\t
\t overflow:hidden;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<script src="http://m.couponi.com.sa/jquery.touchSwipe.js"></script>
<div id="test" class="box">Swipe me
<a href="http://www.google.com/">google.com</a>
</div>