SecondJSFiddle has a Code Wrap drop-down is about the Code Wrap with a default setting to "onLoad""onLoad".
There are
The drop down has 4 options to choose:
onLoad: wrap the code so it will run in onLoad window.eventonDomReady: wrap the code so it will run in onDomReady window event.no wrap - in <head>:do not wrap the JavaScript code, place it in section.no wrap - in <body>:do not wrap the JavaScript code, place it in section.
Here's the documentation.
ChangeHere's your working code after I've changed the script's onLoadonload to Nono Wrapwrap - in <body> in the JSFiddle site.
Second drop-down is about the Code Wrap with default setting to "onLoad".
There are 4 options to choose:
onLoad: wrap the code so it will run in onLoad window.eventonDomReady: wrap the code so it will run in onDomReady window eventno wrap - in <head>:do not wrap the JavaScript code, place it in sectionno wrap - in <body>:do not wrap the JavaScript code, place it in section
Here's the documentation.
Change the script's onLoad to No Wrap - in <body> in the JSFiddle site.
JSFiddle has a Code Wrap drop-down with a default setting to "onLoad".
The drop down has 4 options:
onLoad: wrap the code so it will run in onLoad window.eventonDomReady: wrap the code so it will run in onDomReady window event.no wrap - in <head>:do not wrap the JavaScript code, place it in section.no wrap - in <body>:do not wrap the JavaScript code, place it in section.
Here's the documentation.
Here's your working code after I've changed the onload to no wrap - in <body>
Second drop-down is about the Code Wrap with default setting to "onLoad".
There are 4 options to choose:
onLoad: wrap the code so it will run in onLoad window.eventonDomReady: wrap the code so it will run in onDomReady window eventno wrap - in <head>:do not wrap the JavaScript code, place it in sectionno wrap - in <body>:do not wrap the JavaScript code, place it in section
Here's the documentation.
Change the script's onLoad to No Wrap - in <body> in the JSFiddle site:.
Change the script's onLoad to No Wrap - in <body> in the JSFiddle site:
Second drop-down is about the Code Wrap with default setting to "onLoad".
There are 4 options to choose:
onLoad: wrap the code so it will run in onLoad window.eventonDomReady: wrap the code so it will run in onDomReady window eventno wrap - in <head>:do not wrap the JavaScript code, place it in sectionno wrap - in <body>:do not wrap the JavaScript code, place it in section
Here's the documentation.
Change the script's onLoad to No Wrap - in <body> in the JSFiddle site.
Change the script's onLoad to No Wrap - in <body> in the JSFiddle site: