Frameworks & Extensions panel, set
No wrap - in <body>.
It took me a while to figure this out.
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.
©2020 All rights reserved.