Unbreakable Unbreakable - 4 months ago 27
jQuery Question

jsfiddle : not able to add script with http

I am absolute beginner. I have very basic question regarding "jsfiddle" and javascript solution that I receive via "jsfiddle".

Question 1:
When ever I try to add script/plug in jsfiddle as "External Resource" I get warning of using https and not http. But I have receive solution where people use http link as external resource but still it works perfectly fine. Why it works?
Kindly see this link for reference: http://jsfiddle.net/m2Lpw52g/

<div id="treeview"></div>


Question 2:
The solution provided in above link needs jQuery but the "External link" does not have reference to jQuery then why jsFiddle still runs.

It sounds like a silly question but Please help me.

Answer

I have receive solution where people use http link as external resource but still it works perfectly fine. Why it works?

This is because it's a very old fiddle - from before the https:// restriction on external files was implemented.

The solution provided in above link needs jQuery but the "External link" does not have reference to jQuery then why jsFiddle still runs.

This is because the fiddle includes jQuery through the JS settings. Click the cog icon to the right of the 'Javascript' heading in the bottom left panel to see these settings.

Comments