title: How to create a jQuery function to return a bool?
body: <p>How can I create a jQuery function like </p>
  
  <pre><code>$.MyFunction(/*optional parameter*/)?
  </code></pre>
  
  <p>which will return a bool?</p>
  
  <p><strong>note:</strong></p>
  
  <p>I've tried this:  </p>
  
  <pre><code>jQuery.fn.isValidRequest = function (options) {
  
      return true;
  }
  
  // I'm contending with Prototype, so I have to use this    
  jQuery(document).ready(function ($) {    
  
      // and jQuery 1.2.6, supplied by the client - long story
      $('a').livequery('click', function () {
  
          alert($.isValidRequest("blah"));
          return false;
      });
  });
  </code></pre>
  
  <p>but it crashes on the alert() with </p>
  
  <pre><code>Microsoft JScript runtime error: Object doesn't support this property or method
  </code></pre>
  
  <p><strong>This is what worked in the end:</strong></p>
  
  <pre><code>jQuery.isValidRequest = function (options) {
  
      return true;
  }
  </code></pre>