title: jQuery addClass to element based on attribute value
body: <p>I am stuck with this and need some help.  I know the logical solution for this, but not sure how to translate it to jQuery code (newbie here :)).  Any suggestions or help greatly appreciated!</p>
  
  <p>I need to add a css class (active class), to an element that has a title attribute equal to the value of a variable.  So, let's say my variable currentElement = 'great day'.  There is also an a tag element on the page that has the title attribute of 'great day', such as <code>&lt;a title='great day' href='#'&gt;</code>.</p>
  
  <p>With jQuery I want to:  Find a tag in the DOM where currentElement == a tag title and add css class.  So, ideally it should find that a tag and add the css class to it.</p>
  
  <p>I came up with something like this but not working:</p>
  
  <pre><code>/* set currentElement var to the src attribute 
     value of an a tag on the page
     this works */
  var currentElement = $('#greatLink'] img[src*=' + test + ']').attr('src');
  
  /* now find an a tag on the page that has 
     the same title attribute as var currentElement
     this does not work */
  $("a[title ='+currentElement+']").addClass('selectedThumb'); 
  </code></pre>