JSFiddle - React, Tailwind, and code Playground
HTML
<a href="#" id="isActive" onclick="javascript: toggleThisDiv(this.id);" style="float: left;" title="Expand/Collapse">
<img src="arrow_down.gif" border="0">
</a>
JavaScript
function toggleThisDiv(id) {
// do your other stuff in this function
alert('hiding some divs');
document.getElementById(id).onclick=function() {
//location.reload(true);
alert('I will reload now!');
};
}