I found similar questions while searching for a solution for my problem but I don't think its quite that what I'm looking for.
Using jQuery's .on() is no brainer for binding events on dynamically created elements, but I got stuck while trying to pass different parameters to call different functions. After reading https://developer.mozilla.org/en/JavaScript/Guide/Closures I came up with the following working example, but I would like to know if its the best way to do it or if there is a more elegant solution?
Plus I often read that using eval() isn't a best practice due to vulnerability issues but is there another way to build dynamic function names?
Edit:
Thanks a lot for everyone for the great answers! Did one of the answers got deleted though? I liked that one because of the hint to store the parameter in an attribute. Thanks again all!