I have a unknown number of different ID's which looks like #send_1, #send_2 and so on. I need to call a jQuery for each of that ID like:
$(document).on("submit", "#send_1", function(e){
var i=1;
if (something is true) {
do something
}
});
$(document).on("submit", "#send_2", function(e){
var i=1;
if (something is true) ) {
do something
}
});
So i could write a hundred times the same function just changing _x but there shall be a more propper way to solve this.
I usually dont use jQuery so if there is someone who could help me out I really would appreciate.
Thanks in advance.