Suppose we have a button reset and we have written the code on his event and we want to fire same click on other event or function.
Then we can trigger his event on other function.
- <button value="Reset" id="btnReset" title="Reset" type="reset">RESET</button>
So if just we want to call the reset functionality on other function, then simply we just trigger the click event on that function.
- function resetAgain() {
- int count=0;
- $("#btnReset").trigger("click");
- }
By calling the resetAgain() reset will again fired.