I am invoking a jquery.fancybox link from a click event bound to a table row. The action works fine for the first time, however, if I close fancybox and click on any line again, the anonymous function associated with this line still works, but fancybox does not start. Here is the javascript I am using:
$jq(document).ready(function() { $jq('a.edit').fancybox({ 'overlayShow': true, 'hideOnContentClick': false }); $jq('tr').click(function() { alert("clicked"); $jq(this).find('a.edit').trigger("click"); }); });
So then in HTML I have bindings classified as βeditβ:
<tr> <td>...</td> <td> <a href="/candidates/22/qualifications/16/edit" class="edit">edit</a> </td> </tr>
I can always see the warning window, and I can change the trigger / click () call to remove (), and it will "work", removing the bindings in several cases. I can also manually manually click the $ ('. Edit') link, and all this is good.
So, how does it happen that the anchor click event fires only once, when it in turn comes from the row click event? Is this somehow related to the call I make for $ (this) when describing a function?
user247534
source share