试图将Tangle.js库添加到jsfiddle并且它不工作。如何添加Tangle.js作为jsfiddle的外部资源
小提琴是here
代码是:
var tangle = new Tangle (document.getElementById("bedroomcostcalculator"), {
initialize: function() {
this.bedrooms = 2;
this.cost = 300000;
this.costperbedroom = 150000;
},
update: function() {
this.cost = this.bedrooms * this.costperbedroom;
}
});
URL的纠结是:http://worrydream.com/Tangle/Tangle.js
我们添加的URL外部资源,但它没有拿起它。我已经看到其他文章需要链接到CDN格式 - 我们将如何做到这一点?
你可以使用github cdn链接https://cdn.rawgit.com/worrydream/Tangle/master/Tangle.js – yurzui
真棒 - 谢谢。 –