title: Get parent element in Angular directive
body: <p>I'm attempting to find the parent <code>tr</code> element when I use clicks a button on a <code>datepicker</code> calendar. Since I don't want to use jQuery <strong>in the form of a script tag (edit)</strong> in my Angular app, and this isn't possible using strictly CSS, I created the directive below. The <code>elm.find</code> is able to find and alter the css of the button correctly, so I know that I've found the element I'm looking for, however now I need to travel up the DOM. </p>
  
  <p>I'm used to jQuery syntax, which doesn't work, and I haven't been able to find anything effective on the interwebs. Any chance someone could help me out with the syntax? </p>
  
  <pre><code>    /* Linker for the directive */
      var linker = function (scope, elm, attrs) {                   
          elm.on('click', function() {
              elm.find('table tbody tr button.active').parent('td').css('background-color', 'red');
          });
      };
  </code></pre>
  
  <p><strong>EDIT</strong></p>
  
  <p>This is a directive that needs to be placed on a <code>uib-datepicker</code> element (Angular UI Bootstrap) in order to change alter the background-color for an entire row. The framework doesn't come with this functionality and the HTML isn't generated until the page loads. </p>
  
  <p>I need to attach the directive to the element below, find the selected item and then work back up the DOM to find the parent <code>tr</code>. </p>
  
  <pre><code>&lt;uib-datepicker highlightselectedrow class="well well-sm" &gt;&lt;/uib-datepicker&gt;
  </code></pre>