It is a challenge in freecodecamp where user has to create random quote machine and as bonus problem it should also tweet selected quote. When I am trying to change ‘data-text’ attribute using .attr() method of jQuery, it is not changing.
My code is in codepen
In following line of jQuery code I am trying to change attribute but it is not changing.
$('#twitter').find("a").attr("data-text",quote[randomNum]);
What could be the possible solution for this?