Reply To: trigger button click

About Forums Forum trigger button click Reply To: trigger button click

#600

In order for the jQuery trigger() method to work, you need to create a click handler somewhere in your code. So you need both:

// put this at the end of the onReady() method
$(‘button’).on(‘click’, handleClick);

// now trigger should work in the onButtonPress or onButtonRelease methods
$(‘button’).trigger(‘click’);