title: Adding a div before error label in jquery validation
body: <p>i am writing jquery validation code and i want to add a div just before the label with a class name. i was unable to do so. So i found to add a wrapper in that label and also found to add class on that wrapper <a href="https://stackoverflow.com/questions/5054120/how-do-i-include-the-field-label-in-a-jquery-validate-error-message">here</a> [second answer] but it too didnt worked out. the page just redirects.</p>
  
  <p>According to that answer i did like this:</p>
  
  <pre><code>$('#frm_product_info').validate({
      wrapper: "div class='abc'",
      rules:{
          lens_type:{
              required:true   
          },
          color:{
              required:true   
          }
      },
      messages:{
          lens_type:{
              required:"Please select a lens type."
          },
          color:{
              required:"Please select a frame color."
          }
      }
  });
  </code></pre>
  
  <p>so please can any one help me to add a div before that label..or figure it out why the above code is not working if it is correct.</p>
  
  <p><strong>More codes</strong></p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;form name="frm_product_info" id="frm_product_info" method="post" action="http://192.168.1.3/optic/site/cart_steps/steps/"&gt;
      &lt;h3 class="margin_bottom"&gt;Select Lens Type&lt;/h3&gt;
   &lt;input type="radio" name="lens_type" value="4"/&gt; Progressive&lt;br/&gt;
   &lt;input type="radio" name="lens_type" value="3"/&gt; Bifocal&lt;br/&gt;
   &lt;input type="radio" name="lens_type" value="2"/&gt; Single Vision Distant&lt;br/&gt;
   &lt;input type="radio" name="lens_type" value="1"/&gt; Single Vision Reading&lt;br/&gt;
  
       &lt;input type="submit" value="Buy Now" class=" btn btn_buy_now"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>SCRIPT</strong></p>
  
  <pre><code>&lt;script type="text/javascript" src="http://192.168.1.3/optic/js/jquery.validate.js"&gt;&lt;/script&gt;
  &lt;script&gt;
  $(document).ready(function(){
  $('#frm_product_info').validate({
      wrapper: "div",
      rules:{
          lens_type:{
              required:true   
          },
          color:{
              required:true   
          }
      },
      messages:{
          lens_type:{
              required:"Please select a lens type."
          },
          color:{
              required:"Please select a frame color."
          }
      }
  });
  });    
  &lt;/script&gt;
  </code></pre>