Hi,
I have a further problem relating to the above question. When removing a class, I believe this can only be done via the jquery method:
$(node.span).removeClass("custom1") and there is no associated node.data.removeClass("custom1") method, similar to the way the above problem was solved.
When I remove a class from a node, it re-appears again (presumably when the node is re-rendered.
In my case I have an 'ignore-node' class which (using CSS) displays with a strike-through of the title. When I try to remove the ignore, it works temporarily, but then the class/strikethrough re-appears when I expand / collapse the node.
I have added to the fiddle code by suresh2 above (correcting the issue that they originally raised), and adding a button to 'Remove Icon from active node'. This re-creates my problem.
Hope someone can help.
Ann