What would be the equivalent of delegating to the JS?

Asked

Viewed 36 times

1

When an element is created dynamically by JS and this element needs to perform a function I do so in jQuery:

$(document).on('click', 'button#doLogin', function(){

});

How is it in the pure JS ? Vanilla.js

  • That’s not what you’re looking for? Document.addeventlistener

  • Duplicate of which question?

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.