Tell us what’s happening:
I"m trying to replicate this process in my Random Quote Generator, but having trouble figuring out what exactly I’m supposed to do. All of the lessons in this section involve nothing more than copy-pasting a given batch of code without explaining what it does and why in any way! So, given that I copy-pasted that same code into my quote generator, changed the ids and classes to the ones in my project - I caught that at least - and since I’m clicking my button and the html is not changing as per the example, I haven’t the slightest idea how to proceed.
Your code so far
HTML
<p>Click the button for a random quote!</p>
<div class ="quotebox">
The quotebox is here.
</div>
<button id="quotebutton">Push for new quote</button>
Javascript:
$(document).ready(function() {
$("#quotebutton").on("click", function(){
$(".quotebox").html("Here is the message");
});
});
Your Browser User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.132 Safari/537.36
.
Link to the challenge:
https://www.freecodecamp.org/challenges/change-text-with-click-events