If I have a click event on a link or button, how can I trigger the same click event through another action on the page?
let myButton = Y.one('.button');
myButton.on('click', function() {
// code
});
I noticed YUI3's fire() method, but it seems like it is more for custom events. Would myButton.fire('click')
work in this scenario?
(I am seeking an alternative to jQuery's .trigger() method, which can be used with DOM events as well as custom events.)