title: Assign class using javascript only if there is something in input field
body: <p>Is there any way to assign class by using javascript when there is some values in input field (text field)</p>
  
  <p>-- detailed --</p>
  
  <p>Actually im using background watermark in the input field. So when someone click &amp; type it on the input field then i will clear the background watermark image by css (using :focus selector). </p>
  
  <p>In that way if he move to the next field then still the background watermark showing with the typed text (because onfocus is lift to the next field).</p>
  
  <p>Anyone please?</p>
  
  <p>If so i will make style to clear background watermark image using the class!</p>