title: Jquery Mobile Swipe and click
body: <p>I am trying to add a next button to my already working swipe code. But it does not do what I want it to do, which is that by clicking it also moves to the next page.
  See here part of my code</p>
  
  <pre><code>&lt;script&gt;
  $(document).ready(function(){
      $(document).on("swipeleft", 'div.ui-page', function(){
          var nextpage = $(this).next('div[data-role="page"]');
          if (nextpage.length &gt; 0) {
              $.mobile.changePage(nextpage, {transition:"slide"}, false, true);
          }
      });
      $(document).on("swiperight", 'div.ui-page', function(){
          var prevpage = $(this).prev('div[data-role="page"]');
          if (prevpage.length &gt; 0) {
              $.mobile.changePage(prevpage, {transition: "slide",
              reverse: true}, true, true);
          }
      });
      $("nextBtn").on("click",function() {
          var nextpage = $(this).next('div[data-role="page"]');
          $.mobile.changePage(nextpage, {transition:"none"}, false, true);
      });
  }); 
  &lt;/script&gt;
  </code></pre>