jQuery Click Button Activates Another Button

A1WEBSITEPRO QuestionsCategory: jQueryjQuery Click Button Activates Another Button
Franklin asked 7 years ago

I would like to know in jQuery if I click a button how can I make it activate another button on the same page?

jQuery Click Button Activates Another Button was last modified: June 16th, 2017 by Franklin
1 Answers
Best Answer
Maximus Mccullough Staff answered 7 years ago

Sure just set up your buttons like this. 

<button id="foo">Button One</button>
<button id="boo">Button Two</button>
<script type="text/javascript">$(function () {   
$("#foo").on("click", function () {           
$("#boo").click()   
});});</script>

Answer for jQuery Click Button Activates Another Button was last modified: June 16th, 2017 by Maximus Mccullough