title: How to replace div's id with a variable?
body: <pre><code>$('#divsT &gt; div').hide(); //works
  $('#divsT &gt; div').eq(xdiv).show();  //works
  </code></pre>
  
  <p>I need to replace <code>#divsT</code> with a variable, but something is wrong here:</p>
  
  <pre><code>var a = $(this).parent().attr('id');  //result: xdivsT
  var b = a.replace("x", "");  // result: divsT
  var c = $('#' + b);  // should be #divsT
  c &gt; div.hide();  // doesn't work
  c &gt; div.eq(xdiv).show();  // doesn't work
  </code></pre>