I am trying to remove hover and click for a svg element(Raphael). Just wrote a sample example (didn't verified syntax error please pardon me), whenever the updateBox function executes it adds hover and click (below example is just piece of code to describe my problem,i could avoid having the hover and click but in our real project we dont want to remove them for a reason). I tried unbinding also hover function with empty return but still we see the hover action when the mouse enters and leaves.
function updateBox() {
var helperRect = _drawOptions.paper.rect(bbox.x - 1, bbox.y - 1,
(bboxWidth !== 0 ? bboxWidth + 2 : 3),
(bboxHeight !== 0 ? bboxHeight + 2 : 3));
helperRect.attr(Configuration.getAttributes("helperRect"));
helperRect.hover(_hoverOverEl, _hoverOutEl);
helperRect.click(_clickEl);
if(a==p)
helperRect = _updateDocHeader(helperRect);
}
function _updateDocHeader(hb) {
hb = $.extend(hb, {
documentId : _paperProperties.header.documentId,
docSlideNo : _paperOptions.whiteboard.docEl.docSlideNo,
docTitle : _paperProperties.header.docTitle,
//set order no to 0
orderNo: 0
});
hb.hover(function(){return false;},function(){return false;});
//$(hb).unbind('mouseenter mouaseleave click');
return hb;
};