title: swipe-right triggered twice in jQuery Mobile
body: <p>I'm trying to integrate <a href="https://github.com/bentonam/jquery.mobile.swiper" rel="nofollow noreferrer">this</a> plug-in into my site so I can swipe to delete. The problem however is that this plugin is triggered with a 'swiperight', the same swipe event is used to reveal my panel. I managed to separate the events using <code>event.target.tagName</code>. When it's a <code>A</code>(link), I want to activate the swipe to delete button and otherwise I want my panel to slide in.</p>
  
  <p>With other words the pageinit event is triggered twice so the swipe to delete button starts to appear then the same event is triggered again. I want to somehow cancel one action but i can't make it work. I already tried:</p>
  
  <pre><code>event.stopImmediatePropagation();
  event.stopPropagation();
  event.preventDefault();
  </code></pre>
  
  <p>I also tried to use some solutions given here but with no luck:
  <a href="https://stackoverflow.com/questions/14468659/jquery-mobile-document-ready-vs-page-events">jQuery Mobile: document ready vs page events</a></p>
  
  <p>A demo of my problem can be found <em>snip</em> and my current pageinit function is this:</p>
  
  <pre><code>$(document).on('pageinit', function() {
      //Activate horizontal swipe after x px.
      $.event.special.swipe.horizontalDistanceThreshold = 80;
      $('div[data-role="content"]').on("swiperight", function(event) {
          //If tagname is 'A' you probably want slide to delete not the panel
          if(event.target.tagName != 'A') {
              $.mobile.activePage.find("#menu").panel("open");
          } else {
              //Cancel swipe
              event.stopImmediatePropagation();
          }
      });
  
      //Swipe to delete
      $("#swipe li").swiper( {
          corners: false,
          label: "Verwijder",
          swipe: function(event, ui) {
              alert('trigger');
          },
          click: function(event, ui) {
              var $item = $(this);
              //console.log($(this));
              $item.fadeOut(250, function() {
                  $item.remove();
              });
          }
      });
  }); 
  </code></pre>