Reply To: trigger button click
About › Forums › Forum › trigger button click › Reply To: trigger button click
March 28, 2012 at 1:01 AM
#600
soundanalogous
Member
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’);
