JSFiddle - React, Tailwind, and code Playground
HTML
<input type="button" id="locations" value="locations" />
<input type="button" id="train" value="train" />
<input type="button" class="close" value="close" />
<a type="button" class="close" value="close">aas</a>
JavaScript
$('#locations').click(function () {
console.log("locations clicked");
$('input').unbind('click');
//do some stuff
});
$('a').click(function () {
alert("close clicked");
$('*').bind('click');
//do some stuff
});
$('#train').click(function () {
alert("train clicked");
//do some stuff
});