I'm figuring out why this simple script is not working:
jQuery.noConflict();
jQuery(document).ready(function() {
jQuery('.next_button a').trigger('click');
});
noConflict
is necessary because I also load prototype/scriptaculous in this page.
If I replace .trigger('click')
with another function (es: .css(...)
this works well. Only triggering seems to go broken.
How can I simulate an anchor click via jquery? Check this link and see this answer by Stevanicus.
$('a#swaswararedirectlink')[0].click();