title: Find DOM element by ID when ID contains square brackets?
body: <p>I have a DOM element with an ID similar to:</p>
  
  <pre><code>something[500]
  </code></pre>
  
  <p>which was built by my Ruby on Rails application.  I need to be able to get this element via jQuery so that I can traverse my way up the DOM to delete the parent of it's parent, which has a variable ID that I don't have access to beforehand.</p>
  
  <p>Does anyone know how I could go about this?  The following code doesn't seem to be working:</p>
  
  <pre><code>alert($("#something["+id+"]").parent().parent().attr("id"));
  </code></pre>
  
  <p>Upon further inspection, the following:</p>
  
  <pre><code>$("#something["+id+"]")
  </code></pre>
  
  <p>returns an object, but when I run ".html()" or ".text()" on it, the result is always null or just an empty string.</p>