I’m having 2 problems I would love help with.
First problem
I’ve been working on the Random Quote Generator for a couple of days. I have the quote generation working, but it is messy. I have the quotes array in my code twice to make it work, which is stupid, but is the only way I have gotten it to work. I have a function which calls a random quote when the page loads and another to load quotes and change page styling when the button is clicked. I have the quotes array inside both of these functions.
When I take it out of the functions the button clicking function does not fully work. It only modifies the styling for some reason.
Second problem
I’m basically just lost on the tweet button. I’ve read the Twitter documentation and I’m just confused. Nothing I’ve done has any effect on the Twitter icon when you click it. I’ve turned it into a button. I’ve left it as is. If I could figure out how to simply have it react at all when clicking on it, I’m confident I know how to pull the quote into it.
Below are two Codepens.
In this one the quote generation is working when you click the button.
In this one only the quote generation at loading works.
Thanks for your help.