Improve this Jquery code
<p>I have an array of buttons that contain the id's of the buttons. I am then looping through them and adding a click listener. Seems I should be able to do this without the for loop using <code>.each()</code>or something, but I could not get it to work with <code>.each()</code></p>

<pre><code>var settingScreenButtons = ["btn_1","btn_2","btn_3","btn_4"];

for(var i=0;i&lt;settingScreenButtons.length;i++){
        $("#"+settingScreenButtons[i]).click(function(){
            alert($(this).attr("id"));

        });
    }
</code></pre>
