jquery if statement to hide elements
<p>I can't seem to figure out how to simply <strong>hide the "prev" button when I'm on the first div and hide the "next" button when I'm on the last div</strong>.</p>

<p>Hoping there's a pro out there who'd like to help a newb. Here's my code:</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
  &lt;style&gt;
      div { width:40px; height:40px; margin:10px; float:left; border:2px blue solid; padding:2px; }
      span { font-size:14px; }
      p { clear:left; margin:10px; }
  &lt;/style&gt;
  &lt;script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
  &lt;div&gt;&lt;/div&gt;
  &lt;div&gt;&lt;/div&gt;
  &lt;div&gt;&lt;/div&gt;
  &lt;div id="start"&gt;&lt;/div&gt;
  &lt;div&gt;&lt;/div&gt;
  &lt;p&gt;&lt;button id="prev"&gt;Prev&lt;/button&gt;&lt;/p&gt;
  &lt;p&gt;&lt;button id="next"&gt;Next&lt;/button&gt;&lt;/p&gt;
    &lt;script type="text/javascript"&gt;
        var $curr = $("#start");
        $curr.css("background", "#f99");
        $("#prev").click(function () {
            $curr = $curr.prev();
            $("div").css("background", "");
            $curr.css("background", "#f99");
        });
        var $curr = $("#start");
        $curr.css("background", "#f99");
        $("#next").click(function () {
            $curr = $curr.next();
            $("div").css("background", "");
            $curr.css("background", "#f99");
        });
    &lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
