Using jQuery to test if the user has typed in an input?
<p>I have a variable called <code>$places</code>:</p>

<pre><code>    var $places = $('#resultsListing li.place');
</code></pre>

<p>When there are more than 0 <code>places</code> the following code add the class <code>.have-results</code>. If there are 0 results the code adds the class <code>.no-results</code> to the body:</p>

<pre><code>body.removeClass("have-results no-results searching");

body.addClass(places.length &gt; 0 ? "have-results" : "no-results");
$("div#busyAnimation").hide();
</code></pre>

<p>I would like to add another class called <code>.hasnt-typed-yet</code>. I know it is a horrible name for a class, but that's what I want to accomplish; add that class to the body if the user hasn't typed yet in the input.</p>

<p>Any suggestions to accomplish this?</p>
