I want to call a event everytime elements are added. Im using JQuery, which has built-in functions to accomplish adding events to all elements (so also elements that get added later) that match a selector, which looks like this:
jQuery("body").on("click", ".selection", function (evt, selector) { passSelectorToOtherFunction(selector) })
But unfortunately i don't want to put a "click"-event-handler on it, i just want to know when they get added so i can do stuff with them (without having to do that explicitly after each ajax call).
So basically, i'd need something like a 'ready'-event which is available for all elements, like:
jQuery("body").on("ready", ".selection", function (evt, selector) { passSelectorToOtherFunction(selector) }).
Thanks in advance