title: jQuery validation plugin - check if div exist
body: <p>I am making a form and using <a href="http://bassistance.de/jquery-plugins/jquery-plugin-validation/" rel="nofollow">jQuery validation plugin</a></p>
  
  <p>The user has to add at least 1 'tag' to the form before it can be validated. I add the 'tags' using a div.
  This is my code</p>
  
  <pre><code>$(document).ready(function(){
  $("#form").validate({
          rules: {
              tags: {
                      required: function(element) {
                          return ($('.tag').length);
                      }
                  },
              name: "required",
              "checkbox[]": "required",
  
          },
          messages: {
              tags: "No tags found",
              name: "input name!",
              "checkbox[]": "select at least 1 category",
  
          }
  });
  
  });
  </code></pre>
  
  <p>It gives the error even if the div exists sadly. Any ideas?</p>
  
  <p>Thanks in advance!
  Resin</p>