I am new to jQuery and cannot get a selector to work using the id of the element. The code below works:
$(function() {
/* $("#ShowBox").onclick = ShowAccessible; */
document.getElementById("ShowBox").onclick = ShowAccessible;
/* $(".searchcheck").click = ShowAccessible; */
});
function ShowAccessible() {
$("tr.hide").fadeOut();
}
However, neither of the two commented out lines work i.e. they do not apply the click event to a checkbox named "ShowBox" with a class of "searchcheck". Why is this?