title: Get element by class - with dashes
body: <p>I am trying to access some svg elements on a page given their class name. However, it does not work, when the class name contains dashes. Is there some work around?</p>
  
  <pre><code>&lt;svg width="100" height="20" class="123-456"&gt;
      &lt;rect width="50" height="20" style="fill:red" /&gt;
  &lt;/svg&gt;
  &lt;svg width="100" height="20" class="567-345"&gt;
      &lt;rect width="50" height="20" style="fill:red" /&gt;
  &lt;/svg&gt;
  &lt;svg width="100" height="20" class="123-456"&gt;
      &lt;rect width="50" height="20" style="fill:red" /&gt;
  &lt;/svg&gt;
  
  &lt;br&gt;
      &lt;a href="#" onclick="highlightSVG(123-456)"&gt;highlight&lt;/a&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>function highlightSVG(conversationid) {
      $('[class="' + conversationid + '"]').css('width','20');
  }
  </code></pre>
  
  <p>Here is a link to fiddle: <a href="http://jsfiddle.net/93FHf/" rel="nofollow">http://jsfiddle.net/93FHf/</a></p>
  
  <p>It works if I remove the dashes but in that case, I would have to change some naming conventions in my project :-/</p>