Detect if elements are removed jQuery
<p>Ok,</p>

<p>so I have:</p>

<pre><code>&lt;ul&gt;
&lt;li&gt;hello&lt;/li&gt;
&lt;li&gt;bye&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>Then:</p>

<pre><code>$('li').click(function(){
$(this).remove();
})
</code></pre>

<p>But then i have:</p>

<pre><code>if($('ul li').length == 0){
        $('ul').append('&lt;li&gt;You haven\'t favourited anything. Get to it!&lt;/li&gt;');    
    }
</code></pre>

<p>But it doesn't work!</p>
