Codepen d3 with JQuery - can't get started?

Hi, this seems super simple, but I can’t even start a jQuery code pen without an error, Uncaught ReferenceError: $ is not defined

This is the most basic thing and I’ve done it before, but why isn’t this working? Thanks in advance

I have selected and added the jQuery and d3 libraries in Settings.

Here is my starter code:

$(function() {
  console.log("hello world")

I’ve also tried:

$(document).ready(function () {
  console.log("hello world")

Here is my pen:

Hey there,

Looks like there is a slight spelling error in the attached jQuery URL( two d’s in ‘cloudfare’).

Here is the correct URL:

Hope this helps

1 Like

It looks like you may be typing in the script URLs in the JS configuration tab. Just type “jquery” in the search box and click the appropriate resource and it will add it. Don’t type the URL.

Just tested it and it logged the “hello world.” This time the typo was two d’s in cloudflare.

1 Like

@Laurels @jeremy.a.gray

Well i did pick it from the list, but something weird happened and I then started to type d3, so looks like you nailed it!!

How am I ever going to get proficient without you guys looking over my shoulder? lol.

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.