I am trying to send quote to tweet but can’t send one. Can you please tell me what the error + the solution Code. Link: https://codepen.io/residentevilunleash/pen/EEpOXP
$.get(url, callback)function fires its callback after a certain period of time. Meaning that
let textis empty during
$(selector).attr(attributeName)operation. To fix move this operation inside the callback function.
- You are using a
<button>but not indicating any logic for click action. Either change it to an
<a>tag or create a
$(selector).click(handler)to handle the user click.
Thanks man, for the help. It seemed like using button was not the right choice and I put the tweet function separate.