var season = "10";
$( document ).ready(function() {
$("#table").hide();
});
$('#searchButton').on("click", showTable(event));
function showTable(event){
$("#table").show();
document.getElementById("td").innerHTML = season;
}
How is it possible, that the function showTable(event) is automatically executed when the page is loaded? Another problem is, that the click event doesn't work if the button is clicked. What did I do wrong?