Skip to content

Expand "Triggering Event Handlers" article #84

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ajpiano opened this issue Mar 15, 2012 · 4 comments
Closed

Expand "Triggering Event Handlers" article #84

ajpiano opened this issue Mar 15, 2012 · 4 comments

Comments

@ajpiano
Copy link
Member

ajpiano commented Mar 15, 2012

In addition to the basic content there now on $.fn.trigger, the article should cover the following

  • The difference between triggering handlers and the actual browser event happening (ie, why can't I trigger a click on a file input to open the file chooser, why can't I trigger a click on an achor to follow it)
  • * How to get around that (jQuery.simulate plugin, document.createEvent cycle)
  • $.fn.triggerHandler - the difference between it and $.fn.trigger (only calls bound handlers, not default behaviour)
  • Not using $.fn.trigger to control your application - discussing why apps should have direct access to call necessary methods, instead of triggering anonymous handlers bound all over the DOM. (i.e., your "view" should be bound to call application methods, your application shouldn't dig into the DOM to make itself happen)
@kswedberg
Copy link
Member

great stuff! also for $.fn.triggerHandler : doesn't bubble.

@johnkpaul
Copy link
Contributor

I have begun work on this here. I think that I need to read more examples to see how much detail is appropriate.

johnkpaul added a commit to johnkpaul/learn.jquery.com that referenced this issue Apr 12, 2012
@addyosmani
Copy link
Member

This looks good. Planning on expanding it @johnkpaul?

@johnkpaul
Copy link
Contributor

I just updated my pull request to include your feedback, @addyosmani. There's nothing that I'm planning to add.

addyosmani added a commit that referenced this issue May 21, 2012
Added triggering handlers section. Initial work for #84
@ajpiano ajpiano closed this as completed Oct 15, 2012
arthurvr pushed a commit to arthurvr/learn.jquery.com that referenced this issue Jan 4, 2015
arthurvr pushed a commit to arthurvr/learn.jquery.com that referenced this issue Jan 4, 2015
…lers

Added triggering handlers section. Initial work for jquery#84
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

4 participants