Is there a way to looping JavaScript function for multiple fields?

For e.g. I have 5 textboxes such as:

```
text1
text2
text3
text4
text5

```

Now, Each of them does the same thing on "focusout" and hence I dont want to write five different JS functions for each of them:

```
$('#text1').focusout( {
.............
    });

$('#text2').focusout( {
.............
    });

$('#text3').focusout( {
.............
    });

$('#text4').focusout( {
.............
    });

$('#text5').focusout( {
.............
    });

```

How can I avoid writing five different functions here?

Thanks in advance