title: How can I preventDefault inside a callback inside an event handler?
body: <p>For example I have something like</p>
  
  <pre><code>$('div').on('click', '.button', function(event){
    $('.showdiv').show('fast', function(){
       var myvar = someFunction();
       if(myvar == 1){
          event.preventDefault();
       }
    });
  });
  </code></pre>
  
  <p>I want to prevent the Default behaviour of the click button inside the callback of the show function (to ensure that the show div is shown before runnin the myvar function). IBut I can't make the preventDefault() works. How can I make it happen? Thanks!</p>