Search code examples
javascriptjqueryjsfiddle

jsfiddle - Tutorial demo not working


I'm reading the jsfiddle tutorial and copied the demo to jsfiddle: https://jsfiddle.net/cdt86915998/ps6shugt/. Running this demo in chrome and console gives Uncaught TypeError: undefined is not a function.

I suppose this error is caused by javascript configuration, but I already have jQuery(edge) configured.

This is my code:

$('test').addEvent('click', (function() {
    $('test').set('html', 'Goodbye World!')
    $('test').fade('out');
}));

Solution

  • Select MooTools not jQuery as your Javascript Frameworks and Extensions.

    From your tutorial:

    We are using MooTools (jsFiddle’s default library) to do a number of things