I have two html button element like this.
<input type="button" class="button-a" value="Button a"/>
<input type="button" class="button-b" value="Button b"/>
So on clicking any of the button I want to trigger the same event. So I can do that by writing some jquery code like.
<script>
$(document).ready(function() {
//button-a click event
$('.button-a').click(function(){
alert("The event triggered");
});
//button-b click event
$('.button-b').click(function(){
alert("The event triggered");
});
});
</script>
So can we combine both the event()
together like OR condition with jQuery?