Q:

jquery empty() doesn't work

I'm completely new to jquery - so apologies for any stupidity.  Boiled down, my problem is quite simple:
I have html code:
<div class="v" align="center" id="div4">
 <div id="div5" class="h blurb">
  <span style="font-size:20px;">
   <div id="text">DISAPPEAR PLEASE</div>
  </span>
 </div>
 <y>
  <div class="exit">
  </div>
 </y>
</div>

When I click the "y" button, I want the "DISAPPEAR PLEASE" text to clear.  So I'm using a bit of jquery:
 $("y").click(function(){
    $("#text").empty();

 })

...which doesn't work.  It does work if I substitute in "#div5" instead - but obviously that removes the span and #text div too, which I need to remain.  I've spent hours on this: how can I empty just the blimming #text div??  Thanks for any help... 

A:

I know it's an old thread, but maybe still some people who find this are interested.  The problem is that .empty() removes child elements of #text, and not #text itself.  Therefore .remove() should be used instead.