In jQuery you can dynamically bind an event listener to all future instances of divs with a class of ‘subthing’ by binding to a parent element and assigning a filter like so:
$(".thing").on("click", ".subthing", function(){
console.log('subthing clicked');}
);
If I have a jquery plugin that I would ordinarily bind with
$(".subthing").thingify();
Is there an established way ensure that all future instances of .subthing will also have the plugin attached to them?
Try: