The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Whats the difference between
In the first case you’re attaching the event listener to the document, which listens for an event originating from an element with a particular id that bubbles up the DOM.
In the second case, you’re attaching the event listener to the element itself.
Go here: https://api.jquery.com/on/ and read the section with the heading “Direct and delegated events.”