title: Bootstrap Popover Prevent Show in Particular Condition
body: <p>I am using bootstrap popover on my <code>&lt;button&gt;</code> with <code>data-trigger="click"</code>. But when user click on that <code>&lt;button&gt;</code>, I want it to check something beforehand and prevent the popover from showing. For example, if there is input in the form which still empty, popover won't show, else it will show as the normal.</p>
  
  <p>How to do that? I know about BS popover events like <code>.on('show.bs.popover'</code>, but I still can't get it accomplished.</p>
  
  <p>I have tried to do this:</p>
  
  <pre><code>btn_register.on('show.bs.popover',function() { //when bs popover about to show
       if (...) $(this).popover('hide');
  });
  </code></pre>
  
  <p>But popover appear in few miliseconds before it hide. _(:"3</p>