title: How to attr class
body: <p>I have a piece of code which someone wrote for me like this:</p>
  
  <pre><code>var $me = $('.me'),
          crazyNumber = 99999999,
          allOfYou = [
              { 
                  elements: $me.parentsUntil('.you'),
                  target: $me.parentsUntil('.you').parent()
              },
              { 
                  elements: $me.nextUntil('.you'),
                  target: $me.nextUntil('.you').andSelf().filter(':last').next()
              },
              { 
                  elements: $me.prevUntil('.you'),
                  target: $me.prevUntil('.you').andSelf().filter(':last').prev()
              }
          ],
          sorted = allOfYou.sort(function (objA, objB) {
              var a = objA.elements.length + 1 || crazyNumber,
                  b = objB.elements.length + 1 || crazyNumber;
              return a - b;
          });
  
      $('#who').html('you ' + sorted[0].target.data('verb') + ' me');
  </code></pre>
  
  <p>In the end the <code>div#who</code> gets html from <code>target.data('verb')</code> I would like to get the class instead but I dont understand the code, I tried:</p>
  
  <pre><code>$('#who').html(sorted[0].target.data.class);
  $('#who').html(sorted[0].attr('class'));
  $('#who').html(sorted[0] + $(this).attr('class'));
  </code></pre>
  
  <p>And many other things, nothing seems to work (Im not familiar with Jquery target..) </p>
  
  <p><a href="http://jsfiddle.net/FyqsW/2/" rel="nofollow">Example at JsFiddle</a></p>