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 `.each()`or something, but I could not get it to work with `.each()`

```
var settingScreenButtons = ["btn_1","btn_2","btn_3","btn_4"];

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

        });
    }

```