I am trying to add class using JQuery to a button when it is clicked. The following codes show my class and JQuery onclick event with its handler:
CSS
.input-highlight {
background-color: #1E90FF;
color: white;
}
JS
$("#elv-geo").on("click", hightlight);
function hightlight() {
var georgian = $("#geo-elv");
georgian.addClass("input-highlight");
}
When I had "visibility: hidden" in the class, it did work, but with the above code, it doesn't. Any ideas why?