title: How to get elements with an ID containing certain text? (Prototype)
body: <p>I have a set of 3 radio buttons, with these element IDs:</p>
  
  <pre><code>id='details_first'
  id='details_second'
  id='details_third'
  </code></pre>
  
  <p>How do I get all the elements whose id starts with <code>'details_'</code> ?</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>What I'm actually trying to do is this:
  Each radio button has an associated div that I want to display when the radio button is clicked. At one time only one radio button is active, so only div for that radio button should be shown (all others should be hidden). So the code for this that I have is:
  (sorry, it's a bit wide):</p>
  
  <pre><code>&lt;input id="details_first" name="details" type="radio" value="first"  onclick="$('details_*').hide();$('details_first_div').show();" /&gt;First&lt;br/&gt;
  &lt;div id="details_first_div" style="display:none"&gt;div for details_first&lt;/div&gt;
  
  &lt;input id="details_second" name="details" type="radio" value="second"  onclick="$('details_*').hide();$('details_second_div').show();" /&gt;Second&lt;br/&gt;
  &lt;div id="details_second_div" style="display:none"&gt;div for details_second&lt;/div&gt;
  </code></pre>
  
  <p>Or is there a better best-practice way to do this kind of thing? (I'm using Ruby on Rails).
  Maybe by selecting by <code>name</code> attribute - but how ?</p>