title: jQuery Not allowing Second Click on Mobile
body: <p>I am trying to run a click function after opening a menu in wordpress. My current set up is the following. </p>
  
  <p>I am trying something along the likes of <a href="http://codepen.io/ishio/pen/Kwvapv" rel="nofollow">this</a> Sorry, it's hard to post over wordpress content.</p>
  
  <pre><code>jQuery(function () {
      var mqm = window.matchMedia('all and (max-width:767px)');
      if (mqm.matches){
        jQuery("header .menu .menu-item-has-children").click(function (e) {
        e.preventDefault();
        jQuery(this).find("a span").toggleClass('open');
        jQuery(this).find("ul").slideToggle();
      });
     }
  });
  </code></pre>
  
  <p>I'm able to get it to open and close on mobile, however the second click on the parent it just closes it.</p>