title: jQuery validationengine failed for fancybox
body: <p>I have a form with 2 invisible DIV which got visible once a button is clicked, poping-up fancybox window. I have the jQuery validatorengine plugin, which does all the validation stuff. The problem is that the validation engine works fine for normal fields but not for the hidden fields which are inside the fancybox window, once they are visible. I suspect this is because fancybox at runtime puts them outside the scop of <code>&lt;form/&gt;</code> which is causing the validation engine to fail, because it can not work on elements outside a form tag.</p>
  
  <pre><code>$(document).ready(function() {  
    $("#category").validationEngine('validate');
    $('#wrapper #addCat').live('click', function() {
    $('&lt;a href="#addCategoryDiv"/&gt;').fancybox({
      'autoDimensions' : false,
      'hideOnContentClick' : false,
      'height' : 450,
      'width' : 500,
      'scrolling' : 'no'
      }).click();
    });
    $('#wrapper #editCat').live('click', function() {
      $('&lt;a href="#editCategory"/&gt;').fancybox({
        'autoDimensions' : false,
        'hideOnContentClick' : false,
        'height' : 450,
        'width' : 500,
        'scrolling' : 'no'
        }).click();
    });
  });
  </code></pre>
  
  <p>Can someone please help me how to fix this? I can see in Firebug that fancybox has made <code>&lt;div style="display:none"&gt;</code> part of code outside the <code>&lt;form&gt;&lt;/form&gt;</code> tag.</p>