Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 860
RocketNuts Avatar asked Dec 10 '22 09:12

RocketNuts


1 Answers

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

like image 134
Sajeetharan Avatar answered Dec 27 '22 23:12

Sajeetharan