double click needed to activate binded mousedown/up
<p>this is part of my code:</p>

<pre><code> $('.toggle_box').each(function (){ 
var timeout, longtouch;  
         $(this).bind('mousedown', function() {
          timeout = setTimeout(function() {longtouch = true;}, 1000);




          $(this).bind('mouseup', function(){
              if (!longtouch) {
                  clearTimeout(timeout)
                var state = $(this).find('.switch').attr('data-state');
                if(state == "off"){$(this).find('.switch').attr('data-state','on');}
                else{$(this).find('.switch').attr('data-state','off');}
                 var choice = $(this).parent();
                 ckbmovestate(choice)

              }
              else{alert("3")};

          });})});
</code></pre>

<p>when I click an element (mousedown and up) it works fine, but the 2e time I have to double click the element for it to fire. It looks like the second click resets the bind so that the 3e can use it again. just weird.</p>

<p>Here is a demo: Not valid anymore...
It is the orange checkbox :) (please check in safari/chrome)</p>

<p>thank you for your help :)</p>
