title: Add class to all elements with the same href
body: <p>I am trying to get the href of a clicked anchor tag and add a class to all elements that has this same href?</p>
  
  <p>I know how to add a class to one element but how do I add a class to all elements that has this same href?</p>
  
  <pre><code>$('.shop-item').on('click', function(e){
    var hrefz = $(this).attr('href'); //get the href on the clicked anchor tag
    var otherElem = $('a[href$='+hrefz+']').attr('href');
    alert(otherElem);
    //$(this).addClass('newClass');
  });
  </code></pre>
  
  <p><strong>EDIT:</strong></p>
  
  <p>HTML (this is how the <code>href</code>s are)</p>
  
  <pre><code>&lt;ul class="shop-list"&gt;
      &lt;li class="shop-item"&gt;&lt;a href="#Ordering"&gt;&lt;/a&gt;&lt;/li&gt;
      &lt;li class="shop-item"&gt;&lt;a href="#Delivery"&gt;&lt;/a&gt;&lt;/li&gt;
      ....
  &lt;/ul&gt;
  </code></pre>