find element by attribute jquery and trigger click code example
Example 1: trigger button click jquery
$("input").trigger("click");
Example 2: set onclick jquery
$(elem).click(myFunc());
$("input").trigger("click");
$(elem).click(myFunc());