I'm using jquery to remove and add some class to a element as shown below
$("#"+obj.id+" div.treeclick").removeClass("ui-icon-radio-off").removeClass("tree-leaf").addClass("tree-minus").addClass("ui-icon-triangle-1-s");
now I want to bind events that are there for class tree-minus so I use the following line
$("#"+obj.id+" div.treeclick").removeClass("ui-icon-radio-off").removeClass("tree-leaf").addClass("tree-minus").addClass("ui-icon-triangle-1-s").bind($(".tree-minus").data('events'));
but I got an error saying " Object has no method 'apply' " ,how can I add events that I'll get from $("tree-minus").data('events')
Thanks in advance