I am using Rapheael to draw a control Dashboard. Right now I am adding a hyperlink object into the Dashboard editor. It is a text with the HREF attribute.
When I add the element and click on it, it opens the link. Is there some way to temporarly disable the link?
When I click the other elements, it opens the property dialog. I would like that also with the Hyperlink object.
I’ve tried adding return:false, but didn’t help:
obj.dblclick(function (event) {
jQuery('##divProperties').dialog('open');
return false;
});
Returning false is a way to cancel events with more traditional event binding, e.g.
or
But it doesn’t work with jQuery event bindings.
To do that, you need to call the
.preventDefault()method on the event object, which is passed to the event handler:You may want to prevent default on the click event also if you’re capturing double click so it doesn’t get fired either.