I am trying to swipe my images in an image gallery.i am trying to do this on this site.( http://klaret.dk/ ) But my swipe function doesnt work

I am trying to swipe my images in an image gallery.i am trying to do this on this site.( http://klaret.dk/ ) But my swipe function doesnt work. here is the code i am using.I have added the jquery library aswell as the jquery mobile ui library. still it doesnt work

$(document).on("pagecreate", function(){
            alert("here");
            //alert($('.fs_gallery_wrapper').html())
            $(".fs_slide").on("swipe", function() { 
                alert("hello"); 
            });

        });

Related posts

Leave a Reply

1 comment

  1. I did it like this and it worked. Awesome.

    <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
    <script type="text/javascript">
        $(document).on("swipeleft",'.fs_gallery_wrapper', function(){
            //alert("here");
          nextSlide();
    
        });
        $(document).on("swiperight",'.fs_gallery_wrapper', function(){
            //alert("here");
          prevSlide();
        });
    </script>