droppable <tr>, disable childs <a> onclick
Hello,
I have a droppable <tr> which contains some <a> links. Those links have a onclick function:
- <tr id="myselector"><td><a onClick="doFunctionA()">foo</a></td></tr>
On the drop even on the <tr> element, I do another function:
- $("#myselector tr").droppable({
-
- drop: function(event, ui) {
- ...
- }
- });
The problem is that when I drop something on the link, the "doFunctionA" is called and then only the function defined on the tr element.
How can I disable the doFunctionA() in this case ? I tried overriding it in the "ondrop" function:
- $("#myselector tr").droppable({
-
- drop: function(event, ui) {
- $(this).find('a').first().click(function(e) {});
- }
- });
but this doesn't work.
EDIT: I'm actually dragging one tr to another and it's the onClick() of the tr being dragged which is called. So I have the override that onClick event.
- ui.draggable.find('a').removeAttr("onclick");
A better solution would be to dump the onClick event totally and do it also in jquery.
This topic is solved :)
T.