Jquery attr() not working inside click functions
<p>I've been trying for 3 days figure out why the attr() isn't working inside functions in Jquery. It may look like the question has already been answered but none of them is working for me.</p>

<p>I'm trying to change the <code>data-text</code> atribute from a tweet button to tweet the current text.</p>

<p>Here is my code:</p>

<pre><code>$(".twitter-share-button").attr("data-text", "Hello World"); //Working

$("#change").on("click", function() {
    $(".twitter-share-button").attr("data-text", "Hello Universe"); // Not working
});
</code></pre>

<p>Example in Jsfiddle: <a href="https://jsfiddle.net/ooneskbe/" rel="nofollow">https://jsfiddle.net/ooneskbe/</a></p>