I don’t understand the point of this task. I can add a url and text without adding any jquery. I don’t find the explanation very helpful. Is there a point to this. What does the code do?
Thanks for your reply. Maybe I should rephrase my question. I can’t actually see any difference when I add my jquery. I’ve copied other people’s code from here and I can’t tell what has changed.
@gennie_cooperhotmail jQuery won’t change the looks, only the functionality. Are you unable to tell why your code and someone else’s different code work? There are multiple ways of doing the same thing.
Also, make sure you’ve taken the rest of the course before doing these projects, since they guide you on that assumption.
Do you have a question about a specific piece of code I’d be able to help you with?
I still don’t understand what the outcome should be. What is the keyup function meant to do? How does it amend the meme generator? Why would it be needed?
What is the keyup function meant to do?
When you press a key on your keyboard, it goes down, then up. The
keydown() event listener will trigger if you only press the key down, but the
keyup() listener triggers when the key is let up. There’s also
keypress(), which is similar to
How does it amend the meme generator?
Every time you let a key up, it runs the code inside the event listener. It only does what you tell it to, and you’re telling it to replace the text with some new text.
Why would it be needed?
Without listening for a keypress of some sort, you won’t know when to update the text.