title: jQuery form validation, show success message
body: <p>The following jQuery is working very well, now I am trying to show a success message, but I can't get it to work. This is my attempt.</p>
  
  <pre><code>            jQuery("#name").validate({
                  expression: "if (VAL.length &gt; 5 &amp;&amp; VAL)  return true; else return false;",
                  message: "Please enter more than 5 characters",
                  success: function() {
                  $(this).toggleClass("ok");
                  }
              });
  </code></pre>
  
  <p>I would like to show a <code>div</code> with the class 'ok'. </p>
  
  <p>This is the div</p>
  
  <pre><code>&lt;div class="ok"&gt; OK! &lt;/div&gt;
  </code></pre>
  
  <p>and this is the css</p>
  
  <pre><code>.ok { display: none; color: green; }
  </code></pre>