I have a unique question that sets it apart from others because I am looking to activate the button, not just fire it. Here is my syntax:
$("#second_btn").click(function(){
$('#first_btn').addClass('active');
})
#first_btn{
background-color: green;
}
#first_btn:active{
background-color: yellow;
}
#first_btn.active{
background-color: yellow;
}
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<button id="first_btn">
first_btn
</button>
<button id="second_btn">
second_btn
</button>
Essentially, when the second button is clicked, I want the first button to be activated and its color changed to yellow as if the first button itself was clicked.
Check out the jsFiddle version here: click here
Can you assist me in identifying what I might be missing?