title: get custom data from anchor tag using javascript
body: <p>I'm trying to obtain this value for a javscript function</p>
  
  <pre><code>&lt;a href="#" id="like" name="like" data-value="&lt;?php echo $_GET['id'];?&gt; " onclick="like(); return false;"&gt;
                  &lt;img src="&lt;?php echo $ROOT. "/assets/images/templates/like.png"?&gt;" class="aligncenter" alt="" /&gt;&lt;/a&gt;
  </code></pre>
  
  <p>I'd like to get the id which is the data-value.</p>
  
  <p>I've tried using jquery selectors such as <code>var id = $('a[data-value]').attr();</code>but obviously have it wrong.</p>
  
  <p>Any help is appreciated.</p>