mobile swipe detection

mobile swipe detection

hey guys im using a plugin called bxslider and i'm trying to detect when a user swipes the divs.

here are the versions i'm using...i have to use jquery 2.2.4 as the errors it creates with jquery mobile.

jquery            2.2.4
jquery mobile 1.4.5

html
  1. <div class="internet_data">
                      <div class="slide slide-selected" data-value="1 GB">1 GB</div>
                      <div class="slide" data-value="2 GB">2 GB</div>
                      <div class="slide" data-value="3 GB">3 GB</div>
                      <div class="slide" data-value="4 GB">4 GB</div>
                      <div class="slide" data-value="5 GB">5 GB</div>
                      <div class="slide" data-value="6 GB">6 GB</div>
                      <div class="slide" data-value="7 GB">7 GB</div>
                      <div class="slide" data-value="8 GB">8 GB</div>
                      <div class="slide" data-value="9 GB">9 GB</div>
                      <div class="slide" data-value="Unlimited">Unlimited Data</div>
                    </div>


jquery
  1. $.event.special.swipe.horizontalDistanceThreshold = 5;
    $.event.special.swipe.scrollSupressionThreshold  = 5;
    $.event.special.swipe.durationThreshold = 5;

    $( document ).on( "pageinit", function() {
        $('.slide').on("swipe",function() {
                alert('swipe');
        });
    });


sometimes i get the alert swiped sometimes i don't...this is the first time i've worked with jquery mobile so i'm sure i'm doing something wrong here

hope somene can help

thank you