title: adding css style to selected input fields using Jquery
body: <p>How can I set css style on page load to certain input boxes using jquery something like</p>
  
  <pre><code>$(document).ready(function() {
      $("input, textarea").addClass("idle");
      $("input, textarea").focus(function() {
          $(this).addClass("activeField").removeClass("idle");
      }).blur(function() {
          $(this).removeClass("activeField").addClass("idle");
      });
  });
  </code></pre>
  
  <h2>HTML</h2>
  
  <pre><code>&lt;input type="text" name="author" id="author" &gt;
  &lt;input type="text" name=email id=email &gt;
  </code></pre>
  
  <p>But this will add the style to each and every input and textarea which I want to avoid.</p>
  
  <p>How can I apply the desired style to selective inputs/text area fields?</p>