I use JSFiddle for editing my code. However, in certain codes when I'm running JavaScript or jQuery, it doesn't work unless I select "No wrap - <head>
" or "No wrap - <body>
".
In the fiddle above, you will notice that clicking the <button>
element will not alert()
you unless you've selected either the extension "No wrap - <head>
" or "No wrap - <body>
".
I'm a curious person who likes to understand how things work. What exactly does that option change, and why would you change it?
onLoad:
onLoad
window event. This runs when the entire page has loaded (such as images).onDomReady:
onDomReady
window event. This runs when the DOM has loaded.no wrap - in <head>
:
<head>
sectionno wrap - in <body>
:
<body>
section I would like to note that more information can be found in jsFiddle's documentation.