Suppose I have the following html:
<div id="test1">hi</div>
<a href="#" onclick="showDiv()">click here</a>
and the javascript:
function showDiv() {
$("#test1").hide();
}
When I try it on jsfiddle, it returns:
$ is not defined
Did I miss some setting in jsFiddle?
Thanks.
That suggests that you have not selected one of the jQuery libraries from the left hand side of the screen.