71

How do I actually get jsfiddle to use more than 1 library? I can only seem to get it to use either jquery OR knockout but not both. Yet when I look at other peoples fiddles they dont seem to have this problem. Really annoying dont know why its so diffuclt and no searches on the internet yielded anything!!!

Thanks

Exitos
  • 29,230
  • 38
  • 123
  • 178
  • once you have select the js file then under that drop down it will display the nessary js files under that framwork then you can easily select/unselect your wanted ones. – Prageeth godage Apr 09 '15 at 14:27

2 Answers2

55

You can only assign one framework via the dropdown in the sidebar. If you need to add another framework you need to add a resource using a link to a CDN.

Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
  • 24
    Should be able to pick the ones you want with checkboxes. How is this different than adding them manually, other than saving me time from tracking down the URLs. I must be misunderstanding the issue then. – John Lehmann May 13 '13 at 15:15
  • 1
    It's no different, it just moves the burden of checking whether the frameworks you're including are compatible from jsfiddle on to the user. – Rory McCrossan May 13 '13 at 15:54
  • 3
    @RoryMcCrossan : By that reasoning, shouldn't jsfiddle also not allow bad examples? ;-) Let me deal with any headaches... Thats why I fiddle... – Peter V. Mørch Dec 19 '13 at 00:14
  • 5
    "It's no different, it just moves the burden of checking whether the frameworks you're including are compatible from jsfiddle on to the user." - The only difference between selecting multiple frameworks with checkboxes and having to go chase down a URL is convenience. It's inconvenient. Plain and simple. – Spencer Ruport Dec 20 '13 at 16:50
  • what do you mean by CDN – Prageeth godage Apr 09 '15 at 14:40
  • @Prageeth a Content Delivery Network, such as [Google's](https://developers.google.com/speed/libraries/#jquery) enables websites to use common versions of libraries which can be cached in the user's browser. – Rory McCrossan Jul 29 '15 at 19:03
7

Use this to add another framework. Sample showing knockout cdn

$.getScript("//cdnjs.cloudflare.com/ajax/libs/knockout/2.2.1/knockout-min.js", function(){
    /* Lines of code */
    });
demongolem
  • 9,474
  • 36
  • 90
  • 105
Okky
  • 10,338
  • 15
  • 75
  • 122
  • 11
    You don't need to explicitly call getScript, just use the "external resources" section to add other resources. – davertron Sep 23 '13 at 14:53
  • 3
    yes, just type the CDN address as string in the text box next to the "+" button in the External Resources section, then click the "+" button. – user266909 Sep 27 '13 at 06:21