0

I am encountering condition where part of the page isn't present when I try to bind elements on that part of the page. I would like to know if I can avoid the issue by delegating off of a container that is present. To give an example, suppose that I have the following:

$('.contianer').on('click', '.button1', function () {
  console.log('success');
});

Suppose that the code above get's triggered before '.button1' exists but '.container' does exist. Will the console log success in this scenario?

user2977636
  • 1,316
  • 1
  • 12
  • 20

0 Answers0