My question is the following code is in javascript format can we change this to JQuery format..?
<script type="text/javascript">
var lastDiv = "";
function showDiv(divName) {
if (lastDiv) {
document.getElementById(lastDiv).className = "hiddenDiv";
}
if (divName && document.getElementById(divName)) {
document.getElementById(divName).className = "visibleDiv";
lastDiv = divName;
}
}
</script>
Get rid of the online handler, and do this:
Or if the class is only being used for hiding and showing, you can do this: