Hello,
May I please have feedback and some suggestions for this project.
(Solved)Twitter share button caches the first quote and if the button is selected second time the first quote appears on the twitter page.
(Solution) moved Twitter button click function out from being nested with my getQuote click function.
I can’t find a viable FB URL to post to facebook, still looking.
(Completed) I’m in the process of working out a solution for the twitter character limit. Need to decide if that limit should only be for the twitter button or make it a hard limit for the quote itself.
You’re adding click handlers to #shareQuoteButtonTwitter and #shareQuoteButtonFacebook within the click handler for #getQuote. That means every time you click #getQuote, you add an additional handler to both #shareQuoteButtonTwitter and #shareQuoteButtonFacebook.
Try generating 10 quotes and then tweeting the last one. You’ll find the browser opens 10 new tabs with different tweet contents (or more likely, it opens 1 tab and informs you that it’s blocked 9 others).
Your page also doesn’t fetch a quote on load, only after clicking #getQuote. This isn’t a bug, but making the user work more than necessary is bad for UX.
Thank you so much, this helped and fixed my number 1 issue. I thought I needed the twitter click function nested under that to get the quote info but I did not. I moved it out and it works. Thank you thank you again.