Assigning DOM element to variable dosen't work with .click
<p>So, my problem is very simple. Using</p>

<pre><code>$('.tree li.parent &gt; a').click(function(){
        var target = $(this);
        target.parent().toggleClass('active');
        target.parent().children('ul').slideToggle('fast');
    });
</code></pre>

<p>works, it finds the clicked element and does the magic things it is supposed to do.</p>

<p>However, assigning the DOM element to a variable like this does not work:</p>

<pre><code>var things = $('.tree li.parent &gt; a');
things.click(function(){
        var target = $(this);
        target.parent().toggleClass('active');
        target.parent().children('ul').slideToggle('fast');
    });
</code></pre>

<p>I've been trying to get my head around this for a good 45 minutes now, can anyone help me?</p>

<p>Dosen't even work having:</p>

<pre><code>var things = $('.tree li.parent &gt; a');
things.click(function(){
alert("hello");
});
</code></pre>
