title: Perform an action when an li is the last in the ul
body: <p>So have this <a href="http://jsfiddle.net/mDfQT/15/" rel="nofollow">http://jsfiddle.net/mDfQT/15/</a>     </p>
  
  <pre><code>&lt;ul id="variants" data-size="0"&gt;
      &lt;input type="text" id="some_name" class="some_name" placeholder="category name"&gt;
  &lt;/ul&gt;
      &lt;a href="#" class="add_options" data-id="70281696560900"&gt;Add more &lt;/a&gt;
  Number of rows: &lt;span id="count"&gt;0&lt;/span&gt;
  </code></pre>
  
  <p>So the javascript displayed in the fiddle appends an li with a textbox when the add more link is clicked and also removes it when the remove link is clicked. <br>
  When i click the remove link i want to check if that's the last li in the ul and if it's the last/only li i want to also remove the input with id some_name.<br>
  how would you go about this? Thanks.</p>