title: Getting data-position value from parent div on link click
body: <p>I am trying to get the data-position value using jquery on link click. Here is my code</p>
  
  <pre><code>&lt;div class="dfd-article-tile-wrapper tile-position-6"&gt;
  &lt;div id="f_54ae4352d493b83429617a69" data-position="5" class="dfd-item tile"&gt;
  &lt;a class="dfd-item-wrap cxense" target="_blank" href="#"&gt;
      &lt;div class="imageholder"&gt;
          &lt;img src="#" alt="Depresjon - en oversikt " style="background-image: url(image.png);"&gt;
  
          &lt;div class="shader" style=""&gt;
              &lt;h2 class="dfd-tile-header"&gt;Hello World &lt;/h2&gt;
              &lt;span class="source"&gt;xyz.com&lt;/span&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/a&gt;
  &lt;/div&gt;
                      &lt;/div&gt;
  </code></pre>
  
  <p>What I have tried so far to code this jquery code but it is not working;</p>
  
  <pre><code> &lt;script type="text/javascript"&gt; 
       jQuery(document).ready(function($) {
           $(".dfd-item-wrap").click(function(event) {   
               var text = $(this).parents(".dfd-item").find('data-position').value    
           alert(text);
       });
   });
   &lt;/script&gt;
  </code></pre>
  
  <p>This is the jsfiddle link
  <a href="http://jsfiddle.net/nt7243s6/" rel="nofollow">http://jsfiddle.net/nt7243s6/</a></p>
  
  <p>Need help and guidance. Thank you</p>