Jquery click() function not recognising when a link is clicked
<p>I have a very simple JavaScript operation which is just not working. I'm using the twitter-bootstrap CSS, and am attempting to implement the close of the close message box. I have my code here:</p>

<p><a href="http://jsfiddle.net/YQgpe/" rel="nofollow">http://jsfiddle.net/YQgpe/</a></p>

<p>HTML</p>

<pre><code>&lt;div class = "alert-message success"  id = "message_1"&gt;
    &lt;a class = "close" href = "#"&gt;x&lt;/a&gt;
&lt;/div&gt;
</code></pre>

<p>JavaScript</p>

<pre><code>function hideSomething(which_thing) 
{
    $(which_thing).hide();
}

$(".close").click(function() 
{
    hideSomething("#" + $(this).parent().attr("id"));
});
</code></pre>

<p>Essentially I want the same "close" class of link to hide the div when clicked - hence the request for the parent id. But even though jslint tells me my code is valid - it still doesn't work.</p>

<p>Any ideas on how to solve this would be greatly appreciated.</p>
