Get a hard coded jquery selector from an array and hide it?
<p>How would I get each hard coded selector from the array and hide it using the jQuery hide() method?</p>

<pre><code>function hideAllExcept(except) {
//Create an array to contain all of the sub navigation elements
var sub_navigation = new Array();
//Get each sub ul element of the main ul and push it to the previously created array
    $('#navigation_sub ul').each(function(index, element) {
        sub_navigation.push('$("#' +this.id+'")');
    });


var x  = sub_navigation.length;


for(var i = 0; i &lt; x; i++) {
    $(sub_navigation).each(function(index, element) {
        $(sub_navigation)[0].hide();            
        alert(element);
        alert(this);  
        this.hide();
    })

}
}
</code></pre>
