What I am looking for is a way to hide the last one of these that was
clicked. I tried saving the object that was last used in a var but that
didnt work. I thought then maybe I could create some kind of "close all"
that would close all the other layers but not the one we have clicked to
show.
$('#Location').click(function() {
$("#attrname").css('background-color','#8FA9C5');
$("#attrtext").text("Location");
$("#location").show();
$("#shape").hide();
});
$('#Shape').click(function() {
$("#attrname").css('background-color','#8FA9C5')
$("#attrtext").text("Shape");
$("#location").hide(); /* should hide location */
$("#shape").show();
});