This isn't specific to Joomla except that I'm triggering a yootheme Widgetkit action. I have an email sign up form that loads via a javascript, and I've placed it inside a widgetkit lightbox.
I've seen this page: http://yootheme.com/support/question/36003 And it shows the command needed: ('#lightbox-close').trigger('click') running this would trigger the close action on the modal lightbox, closing it.
But because the submit button on this form is pulled into the page via javascript, I can't edit the form itself.
So I was trying to put the script above the form.
Here's what I know for sure doesn't work:
<script type="text/javascript">$("#e2ma_signup_submit_button").click(function () {
$('#lightbox-close').trigger('click');
});</script>
e2ma_signup_submit_button is the ID of the submit button in the form.
Anyone with any amount of jquery skill can probably get this working in a few seconds, so any help would be appreciated.