问题
In jsfiddle
is possible to use for example jQuery.
But I cannot see any references, for example, to underscore or backbone.js.
If I run this demo I get the error:
Uncaught ReferenceError: _ is not defined
How can I use underscore.js or backbone.js libraries in jsfiddle?
回答1:
Add the URL for the required library under the "Add Resources" button on the left hand side.
See http://jsfiddle.net/alnitak/BwHxv/
回答2:
I'm using a self-made jsfiddle base with log included in the HTML, so you don't have to open developer tools :
Includes Backbone and Underscore
http://jsfiddle.net/drinchev/NL2z9/2/
回答3:
I usually started out from this: http://jsfiddle.net/dandiebolt/auHFG/
This comes up as the first result when searching for "jsfiddle underscore".
来源:https://stackoverflow.com/questions/10381066/using-jsfiddle-how-can-i-use-underscore-js-or-backbone-js-libraries