Once I added all the right libraries in Settings, I found that adding the following code in a at the top of my HTML console didn’t work, and whereas simply adding the function to the JS console did. Why is that? In the introductory lessons I was taught that JS can run in the HTML script element…
Here's what I put at the top of my HTML console:
<script>
$(document).ready(function() {
$(".nav").localScroll();
});
</script>
Here’s what worked when added to the JS console: $(".nav").localScroll();
honestly, I don’t know what the expected result is, maybe you’d like to navigate some contents according to your menu I assume. That jquery plugin may require some targeted area or object. Check the source documentation you picked it up.
Thank you for this - I understand better now how to do it “The CodePen Way” and then how to do it without using CodePen’s settings. I think I was combining both before so things were getting whacky.