trigger method on click code example
Example 1: trigger button click jquery
$("input").trigger("click");
Example 2: trigger send parameter
$('body').trigger('this_works', [{data: [1, 2, 3]}, 'something']);
$('body').on('this_works', function (event, json, string) {
// parameter is stocked in json.data here.
console.log(event, json, string);
});