title: If conditions false then prevent default
body: <p>I have a link. When some one clicks on that I want to check some conditions before letting it work. If it's <code>false</code> the default action should be prevented.</p>
  
  <pre><code>$(".pager-next a.active").click(function(event) {
      if (!a == 1) {
          event.preventDefault();
      }           
  });
  </code></pre>
  
  <p>The link should only work if <code>a</code> is equal to <code>1</code>. Is the above code correct. <code>a</code> is set to <code>1</code> if a particular condition is met. The link should only work if the condition is met.</p>