Onclick event not firing on jsfiddle.net [closed]
Solution 1:
In the Frameworks & Extensions
panel, set onLoad
to No wrap - in <body>
.
It took me a while to figure this out.
Solution 2:
You have configured JSFiddle to wrap the code in an onload event handler. Consequently the function you are trying to call onclick
is out of scope.
Don't use intrinsic event attributes. Use jQuery's (since you are using jQuery already) event binding instead.