title: Highlight the input field for error with jquery like twitter bootstrap
body: <p>I have the below sample html code, where i am trying to highlight the input field like input field validation in twitter bootstrap</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  $('#submit_form').submit(function(){
       var vals = $('.validate').val()
       if (!vals) 
          {
            console.log('Error exists');
            $('.validate').attr('style', "border-radius: 5px; border:#FF0000 1px solid;");
            $('.validate').val('enter a value');
          }   
  });
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form action="" method="post" id="submit_form"&gt;
        &lt;div&gt;
          &lt;input class="validate" type="text" name="Name"/&gt;
        &lt;/div&gt;
        &lt;input type="submit" value="Submit"&gt;
      &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>So by the above code the value <code>"enter a value"</code> is updating in the field, but the field is not highlighting</p>
  
  <p>Also when i checked whether the style attribute has added to input.. and yes it was added successfully but why the field is not highlighting</p>