title: How can I use a data attribute and jQuery to make a link clickable or not?
body: <p>I have two buttons on my page:</p>
  
  <pre><code>     &lt;a class="button accessLink"
          id="loginLink"
          data-disabled="false"
          data-href="/MyAccount/Access/Login"
          title="Login"&gt;Login&lt;/a&gt;
  
       &lt;a class="button accessLink"
          id="registerLink"
          data-disabled="false"
          data-href="/MyAccount/Access/Register"
          title="Register"&gt;Register&lt;/a&gt;
  </code></pre>
  
  <p>How can I use jQuery to make it so that if one of the buttons is clicked and if data-disabled is set to false then it:</p>
  
  <ul>
  <li>Sets the data-disabled of both to "true"</li>
  <li>Calls a function called dialog like this: dialog(this). </li>
  </ul>
  
  <p>I also don't want the click to event to work. </p>