jquery error to get the attributes value
<p>I wanna to get the attributes value but it is showing undefined . Please let me know how can i get it.I'm using the following code.</p>

<pre><code>&lt;a href="http://twitter.com" data-url="http://vinspro.org" 
   class="share-button"&gt;Twitter&lt;/a&gt;
</code></pre>

<p>Jquery code:-
I wanna to get the data-url value and insert new value using jquery</p>

<pre><code>$(document).ready(function() {
    var ab=$(".share-button").attr('data-url');
    alert(ab);
    $(".share-button").attr('data-url','http://livestream.com'); 
});
</code></pre>
