Hi im trying call this function from an element, but the element id is dynamic.
<script>
$(function() {
$('#showme_').live('swiperight',function(event) {
$("#showDel_").show();
});
</script>
if a user swipes on an element is shows the delete button.
<div id="swipeme_1">swipe me
<div id="showDel_1" style="display:none;">DELETE</div>
</div>
<div id="swipeme_2">swipe me
<div id="showDel_2" style="display:none;">DELETE</div>
</div>
<div id="swipeme_2">swipe me
<div id="showDel_3" style="display:none;">DELETE</div>
</div>
i can achieve the same effect by looping the javascript in with the backend code of the site. is there another/easier way?
Regards
I dont know which plugin you are using for
swiperlightevent. But if you are not usingtouchwipeplugin then I would suggest you to take a look at thishttp://www.netcu.de/jquery-touchwipe-iphone-ipad-library
Sample code