Get ID of filtered element
<p>I have multiple elements that share a class. At any given time, one of them may be visible. I can determine that one of them is visible, but how do I get it's ID?</p>

<p>n is the ID of an element that has been clicked, 1-4. I want to see if n matches the ID of the visible element so that no action is taken if the matching element is already visible. If you have already clicked one of them and made something visible, clicking again should do nothing. So, which element in c is the visible element - need it's ID.</p>

<pre><code>function manageVisible(n) {
       var x = n, i, c;
       c = $('.glowSafe:visible');
       if(c.length !=0){
           c.fadeOut(300).hide();
           $('#glowSafe' + x).fadeIn(800);
       }
       $('#glowSafe' + x).fadeIn(800);
   }
</code></pre>
