My trigger only runs once?
I have a javascript listening event that initialize in the
DOM via a javascripts function.
- $('#RatingsID a').click(function()
- {
- var id = $(this).attr('href');
- //alert(id);
- $("button:first").trigger('click');
- }
- );
From there I use the trigger('click') to click a button on the page. The button when clicked opens an external overlay to display ratings on a product to a user. This function works fine only one time, when the overlay get's closed and the user clicks on the link again nothing happens. I want to be able to trigger the click when ever the listening event get's called.
Can anyone help?
I forgot to mention, In order for the trigger to work again I have to reload the page.