removeClass() - tag still thinks it has class

removeClass() - tag still thinks it has class

In the following code, clicking on a span with class "qwe" will alert a message. If you then click the first span to remove "qwe" from the other spans, the alert still shows when you click the old "qwe" spans. It's like the spans still think they have the class "qwe". Once a "qwe" always a "qwe"?

I've obviously made a mistake but don't understand why. Any suggestions?


  1.         $(document).ready(function(){
  2.             $(".a").click(function(){
  3.                 $(".b").removeClass("qwe");
  4.             });
  5.             $(".qwe").click(function(){
  6.                 alert("I'm still here, why?");
  7.             });
  8.         });

  9.     <span class='a'></span>
  10.     <span class='b qwe'></span>
  11.     <span class='b qwe'></span>
  12.     <span class='b qwe'></span>
  13.     <span class='b qwe'></span>