[jQuery] Dont removeClass...

[jQuery] Dont removeClass...

Hi,
This is my code :
$("li", this).each(function(i){
                          var data = $(this).html();
                        $(this).bind("click", function() {
                             var e = $(this);
                             if (e.css("text-decoration") == "line-through") {
                                  e.css("text-decoration", "none");
                             } else {
                                e.css("text-decoration", "line-through");
                            }
                             $('div.cTag_'+data).each(function(i){
                                  var id = $(this).get(0).id;
                                  if (e.css("text-decoration") == "line-through") {
                                       $(this).addClass("invTag_" + data);
                                 } else {
                                    $(this).removeClass("invTag_" + data);
                                }
                                  alert(id + " -> " + $("#"+id).get(0).className);
                                if ($("#"+id).get(0).className.indexOf("invTag") != -1) {
                                     $("#"+id).hide();
                                } else {
                                     $("#"+id).show();
                                }
                            });
                        });
                    });
Its OK, addClass works, but it doesn't remove class... My Alert() :
cTag_AFP (At start)
*click
cTag_AFP invTag_AFP
*click
cTag_AFP invTag_AFP
*click
cTag_AFP invTag_AFP invTag_AFP
*click
cTag_AFP invTag_AFPinvTag_AFP <- without space !!
...
I'm using jQuery
1.0.1 and I have same bug with 1.0a and 1.0
Florian
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/