I have a problem with jQuery at the moment when it comes to children that are dynamically pulled in with AJAX.
So, I have the following statement:
$('.Select-menu-outer').children().click(function() { console.log("tiggered"); });
However, this does not work for some reason, when I click on the children of the .Select-menu-outer element, nothing happens.
If I use the following statement:
$(document).on("click", '.Select-menu-outer', function() { console.log("tiggered"); });
It runs, however, I would like it to run on the children of this element. Any idea how I can do this using .on?
thanks
source share