A little strange about my getJSON

I try to to use getJSON in my codepen and test it:


You can see that it prints nothing on the console, but when I visit my friend’s codepen and alter one of his project to just show my code and test it:

You could see that it is fine. So, is it a problem of the setting or something else?

Have you added JQuery in your Javascript settings?
Settings/Javascript/Quick Add

Yes. I add the same settings for both case :slight_smile:.

What does the chrome console say for your one? Chrome’s console will report errors even when Codepen’s built in console does not.

Without seeing the pens for comparison, my guess would either be that something is wrong with the jquery link you are using, or the two pens might be using different protocols: maybe you’re using https://codepen and your friend is using http://?

@JacksonBates: Oh, you are right. I was using https and it didn’t work. I just get rid of that protocol and it works now. I don’t know why but thank you.