Portfolio Challenge: //#sourceURL:pen.js message

Hi !

I am trying to integrate bootstrap commands into my code but I keep getting this //#sourceURL:pen.js message and I have no idea how to fix that. Thanks for the help, here is the link to my pen page: https://codepen.io/bensrd/pen/wrZrRo

It looks like it’s coming from the <script> tags in the JS editor. Those aren’t necessary.

Then you have to make a couple changes to your code. There should be a ( after the function keyword. Then there should be a ) between the } and the ; at line 3. You may also want to put a semicolon at the end of line 2.

Thanks for the help ! However it seems to still not be working and I keep getting the ‘unexpected token’ error message :smiley:

It looks like you still haven’t removed the <script> tags in the JS editor. An opening parenthesis is also missing after the function keyword. There should be quotes around h1. And addclass should be addClass (uppercase C).

Everything in the JS editor should roughly look like this:

$(document).ready(function() {
  $("h1").addClass("animated bounce");

Also a heads-up. The <h1> won’t bounce unless you import another library called Animate.css. It should be in the CSS Quick-add menu.

I forgot to save, that’s why haha ! Thanks for showing me. I changed addClass to ‘css’ to have h1 be displayed in red. The code doesn’t show any error anymore but the h1 is still black. Is it also linked to a missing library? Thank you for your patience!

The h1 should be wrapped in quotes (like $("h1").css(...)).

It worked, thank you Master.

I was having a similar issue and @kevcomedia’s comments were spot on. Thanks for reminding us we don’t need script tags in codepen. That wouldn’t have occurred to me!