I'm trying to use jQuery to simulate a click on an "Add Row" link. I want to trigger the javascript function attached to the link.
The function that adds the row is in a separate file, so I can't call it directly. (Specifically, it starts on line 57 of Django's admin inline.js file.) I guess my only other option is to trigger a click event on the link.
However, I tried to do this with:
$("tr.add-row a").trigger('click');
To no avail. It doesn't trigger the click event.
How can I get jQuery to click the link? (Or, ultimately, how can I add a row?)
Thanks in advance!