I have tried to create for loop in jQuery. it has worked!
for (var i = 1; i <= 40; i++) { (function(i) { $(\'.infosegment2-1-\'+i).clic