Hi,
I’m trying to run simple peace of code form camp in codepen and its not working and I have no idea why.
code from > Change Text with Click Events (263)
Hi,
I’m trying to run simple peace of code form camp in codepen and its not working and I have no idea why.
code from > Change Text with Click Events (263)
Do you have a link to your pen?
What url did you provide for the request?
Hi,
Go to Settings > Javascript > add jQuery.
Instead of having your javascript between <script>
tags, you can just past the code in the Javascript panel.
uff, thank you. Now I will try to understand why
Why what? The function you wrote to change the html is a jQuery code (you can see that because of the $ sign). So it requires the jQuery library to work. The same way that your bootstrap classes won’t work if you don’t link your pen to Bootstrap.
ok, thank you. too long brake in course…
Ok thanks that is useful. (I wish they’d explained that in the course manual!)
My code seems to be refreshing immediately after I click the button. Currently here in the code. Any idea how to prevent this?
Hmmm! I’m sure loads of folks have encountered this problem:
When I copy and paste HTML and CSS from FreeCodeCamp into CodePen it doesn’t work. Sometimes nothing appears in the preview window, at best, it appears incorrectly and doesn’t function as it does on the FCC challenges.
Here’s a link to one of mine: https://codepen.io/Fishbite/pen/JmLvWe
Could someone please tell me why and how to correct this please?
Thanks in advance
Remove the tags from the CSS sheet. You only need those in your HTML files, not in the CSS files
I mean these <style>
tags.
That’s simply awesome! Thank you so much @nielsbom