I'm not sure your code does as intended, won't the function be called only once the element is clicked?
This should work okay:
for (var i = 0; i < 5; i++) {
$(DOMelement:eq(i)).click((function(i) {
return function() {
console.info(i);
}
}(i)));
}
Also surely DOMelement.eq(i) as opposed to DOMelement:eq(i)?