This question is just out of curiosity. I want to know how jquery\'s .click() works behind the scenes.
For instance if I create a button:
Uses the DOM event model, which is also what happens when you add the onClick(). so basically it registers a listener for the button to fire off the click event and then performs the code you told it to.