2
votes

I'm trying to get jsfiddle up and running so I can start learning some javascript. I searched around for how to include underscore.js and backbone.js and found stuff like this: Using jsfiddle: how can I use underscore.js or backbone.js libraries?

I'm trying to do the same thing but am having trouble. I basically went to jsfiddle.net. Then I went to the left on Manage Resources and added these two:

http://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.3.1/underscore-min.js

http://cdnjs.cloudflare.com/ajax/libs/backbone.js/0.9.10/backbone-min.js

That's all I did. Then when I tried typing some code into the JS window:

var Vehicle = Backbone.Model.extend({
    prop1: '1'
});
var v = new Vehicle();
console.log(v.prop1);

When I look at the Console, I just see:

TypeError: f.result is not a function
[Break On This Error]   

...s);this._listeners={}}return this}}};h.bind=h.on;h.unbind=h.off;f.extend(g,h);va...

backbone-min.js (line 11)

Did I set up my jsfiddle environment correctly? Thanks!

1
did you try choose jQuery js on Frameworks & Extensions?Jobert Enamno
@JobertEnamno No I did not. I just added jQuery 1.9.1 from that area and it did not work.Crystal
@Crystal you do not have to add external sources, jsfiddle got them. first select library underscore and check backbone.yuwang

1 Answers

2
votes

Based on my investigation it seems I figured out your issue. The issue is the version of your Underscore.js which is 1.3.1. Upgrade it to the latest version 1.4.4. There are issues on 1.3.1 with jQuery 1.9.1

Here's the link of the two scripts you may try for your fiddler. Just replace your existing on External Resources.

http://underscorejs.org/underscore-min.js

http://backbonejs.org/backbone-min.js