Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to define my own js function in jsfiddle?

Tags:

javascript

I want to test how my own function update works on jsfiddle but when I click the button I get an error that update is not defined.

How can I use my own functions on jsfiddle?

like image 407
Radek Avatar asked Aug 29 '11 01:08

Radek


1 Answers

Two problems:

The first problem is that you have some extra text at the end of the script:

})();

The second problem is that you are wrapping the function definitions inside the onDomReadyfunction.

Change this option to no wrap(head) and it will work.

like image 179
Andrew Shepherd Avatar answered Oct 02 '22 12:10

Andrew Shepherd