title: Jquery Tools Overlay call on javascript function
body: <p>I have a jquery overlay window in my html alongwith a button to activate here is the code.</p>
  
  <pre><code>&lt;!-- Validation Overlay Box --&gt;
  &lt;div class="modal" id="yesno" style="top: 100px; left: 320px; position: relative; display: none; z-index: 0; margin-top: 100px;"&gt;
      &lt;h2&gt;  &amp;nbsp;&amp;nbsp;Authentication Failed&lt;/h2&gt;
  
      &lt;p style="font-family:Arial; font-size:small; text-align:center"&gt;
         Ether your username or password has been entered incorrectly.
         Please make sure that your username or password entered correctly...
      &lt;/p&gt;
  
      &lt;!-- yes/no buttons --&gt;
      &lt;p align="center"&gt;
          &lt;button class="close"&gt; OK &lt;/button&gt;
      &lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <h2>Here is the Jquery tools Script</h2>
  
  <pre><code>&lt;SCRIPT&gt;
  $(document).ready(function() {
      var triggers = $(".modalInput").overlay({
          // some mask tweaks suitable for modal dialogs
          mask: {
              color: '#a2a2a2',
              loadSpeed: 200,
              opacity: 0.9
          },
          closeOnClick: false
      });
  
      var buttons = $("#yesno button").click(function(e) {
          // get user input
          var yes = buttons.index(this) === 0;
  
          // do something with the answer
          triggers.eq(0).html("You clicked " + (yes ? "yes" : "no"));
      });
  
      $("#prompt form").submit(function(e) {
          // close the overlay
          triggers.eq(1).overlay().close();
  
          // get user input
          var input = $("input", this).val();
  
          // do something with the answer
          triggers.eq(1).html(input);
  
          // do not submit the form
          return e.preventDefault();
      });
  
  });
  &lt;/SCRIPT&gt;
  </code></pre>
  
  <h2>And here how its called upon clicking on a button or a hyperlink</h2>
  
  <pre><code>"&lt;BUTTON class="modalInput" rel="#yesno"&gt;You clicked no&lt;/BUTTON&gt;"
  </code></pre>
  
  <p>All i want is I dont want to show the overlay on clicking on button or through a link. Is it possible to call it through a javascript function like "showOverlay()" ?? </p>