RemoveClass doesn't work

RemoveClass doesn't work

I've got a problem with removing a class of a element. jQuery does remove the class, when I inspect the element no class is set. But functions especially for the class that has been removed are still executed.

This is my code:
  1. $('.bewerkbaar').mouseover(function()
  2. {
  3. $(this).stop().animate(
  4. {
  5. opacity: 0.6
  6. }, 70);
  7. });

  8. $('.bewerkbaar').mouseout(function()
  9. {
  10. $(this).stop().animate(
  11. {
  12. opacity: 1
  13. }, 70);
  14. });

  15. $('.bewerkbaar').click(function()
  16. {
  17. alert($(this).attr('class'));
  18. $(this).removeClass('bewerkbaar');
  19. $(this).html('<textarea>'+$(this).html()+'</textarea>');
  20. $(this).css({'opacity':1});
  21. });
What's the problem? Thanks in advance.


PS What kind of text editor does this forum use? It's very nice and simple. I like it :)