简体   繁体   English

使用jsfiddle:如何使用underscore.js或ribs.js库?

[英]Using jsfiddle: how can I use underscore.js or backbone.js libraries?

In jsfiddle is possible to use for example jQuery. jsfiddle中可以使用例如jQuery。
But I cannot see any references, for example, to underscore or backbone.js. 但是我看不到任何引用,例如,对Underscore或bone.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? 如何在jsfiddle中使用underscore.js或骨干.js库?

Add the URL for the required library under the "Add Resources" button on the left hand side. 在左侧的“添加资源”按钮下,添加所需库的URL。

See http://jsfiddle.net/alnitak/BwHxv/ 参见http://jsfiddle.net/alnitak/BwHxv/

I'm using a self-made jsfiddle base with log included in the HTML, so you don't have to open developer tools : 我正在使用一个自制的jsfiddle库,其日志包含在HTML中,因此您不必打开开发人员工具:

Includes Backbone and Underscore 包括骨干和下划线

http://jsfiddle.net/drinchev/NL2z9/2/ http://jsfiddle.net/drinchev/NL2z9/2/

I usually started out from this: http://jsfiddle.net/dandiebolt/auHFG/ 我通常从这里开始: http : //jsfiddle.net/dandiebolt/auHFG/

This comes up as the first result when searching for "jsfiddle underscore". 这是搜索“ jsfiddle下划线”时的第一个结果。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM