Javascript Uncaught Reference error Function is not defined
Change the wrapping from "onload
" to "No wrap - in <body>
"
The function defined has a different scope.
If you are using Angular.js then functions imbedded into HTML, such as onclick="function()" or onchange="function()". They will not register. You need to make the change events in the javascript. Such as:
$('#exampleBtn').click(function() {
function();
});
In JSFiddle, when you set the wrapping to "onLoad" or "onDomready", the functions you define are only defined inside that block, and cannot be accessed by outside event handlers.
Easiest fix is to change:
function something(...)
To:
window.something = function(...)