Hi,
Codepen for ths - https://codepen.io/ChrisMorrall/pen/xWpvoR
I’m trying to create a new jQuery function from the code to make an api call and update the quote as I need the call to run on page load as well as when the “New Quote” button is clicked so I don’t want to put the same code in twice (once on document.ready and also when the button is clicked… Looked up how to declare a jQuery function and pulled the code from below my on.click function, which was working fine under the on.click fucntion, and put into a new jQuery fuction called getRandomQuote. But I have tried different ways to call the function and none work, so could do with some help in working this out.
Thanks
Chris