How can I write an if then statement using "this" to determine if a field is empty?
<p>I am simply trying to toggleClass on something based on if the form element is focused and if it's empty or not.  But I can't figure out how to write the if then statement to test whether the field is empty or not.</p>

<p>Here is what I have:</p>

<pre><code>    $(document).ready(function() {
  $('.step').focus(function() {

   $(this).next("div").toggleClass("selected").fadeTo(500, 1);

  });

  $('.step').blur(function() {

   if($(this[value==""])){
    $(this).next("div").toggleClass("selected").fadeTo(250, 0.5);
   }else{
    return;
   }
  });
 });
</code></pre>

<p>I have tried also <code>if($(this).is(":empty"){</code> and it just kept acting like the field was empty even if it wasn't.</p>

<p>I also tried <code>if($this).attr("value")==""){</code></p>

<p>How can I determine whether the field is empty?</p>
