title: Visibility check with JavaScript doesn't work
body: <p>I want to check whether an element with the name "shape_7" is visible. When I perform the following JavaScript it works fine:</p>
  
  <pre><code>var element = shape_7;
  
  if( $(element).is(':visible') )
  {
  //my code
  }
  </code></pre>
  
  <p>However, if I perform the following JavaScript it <strong>doesn't</strong> work:</p>
  
  <pre><code>var counter = 7;
  var element = 'shape_' + counter;
  
  if( $(element).is(':visible') )
  {
  //my code
  }
  </code></pre>
  
  <p>Unfortunately, I need the second case (number as variable) in my situation. How has the second code to be corrected in order to work properly?</p>
  
  <p>Thank you very much in advance for any help!</p>