jquery to find data-attr where
<p>Using the url of the page I have been able to get the value edc into a variable but what I need to do is find the data-ttl where data-uri is equal to edc.</p>

<p>If PHP this would be easy but I'm unsure how to go about it in jQuery</p>

<blockquote>
  <p>domain.com/media-centre/video/edc</p>
</blockquote>

<p><strong>HTML</strong></p>

<pre><code>            &lt;li class="item" data-id="id-7" data-type="services"&gt;
            &lt;a href="#" data-uri='edc' data-ttl='Engineering'&gt;
                    &lt;img src="/assets/img/media-centre/videos/edc.png"&gt;
                    &lt;div class="itemcontent"&gt;
                        &lt;h2&gt;Engineering&lt;/h2&gt;
                    &lt;/div&gt;
                &lt;/a&gt;
            &lt;/li&gt;
</code></pre>

<p><strong>JQUERY - my tried and failed attempt</strong></p>

<pre><code>var permatitle = $('a').attr('data-uri').val('edc');
</code></pre>

<p><strong>SORTED</strong></p>

<blockquote>
  <p>var permatitle = $('a[data-uri="edc"]').attr('data-ttl');</p>
</blockquote>
