Search code examples
javascriptjsfiddle

JavaScript function not found on jsfiddle


Very simple minimal jsfiddle example:

https://jsfiddle.net/a9f2j4xo/

Clicking the button should invoke the Bla() function.

When I click the button the console says

ReferenceError: Bla is not defined.

Who or what is malfunctioning here, jsfiddle or my brain?


Solution

  • You need to wrap the function script inside <head> . Otherwise your script is not invoked.

    Change the settings as

    LOAD TYPE - Wrap in <Head>
    

    WORKING DEMO

    enter image description here