I know I can assign an event handler to an html element or class so that if new elements are loaded dynamically the event will still fire to the new added elements. For example:
$('#main').on('click','a.link_class', function () {
// ...
});
I have elements to which I apply a plugin function and then contain those in an array. Then I need to assign an event to this array elements (specifically to them,not to a class they have in common). Is there any way to do this avoiding using for loop or each() (so that new elements added lately to the array still fire with the event)? A simple way like the above example? Something like:
$('#main').on('plugin_event',array, function () {
// ...
});
or...
$('#main').on('plugin_event',array[i], function () {
// ...
});