Bear Bibeault wrote:In jQuery event handlers, the target is available as the function context.
Bear Bibeault wrote:e is the jQuery.Event instance, this (function context) is the target.
Gregg Bolinger wrote:Something else you might consider, just for keeping things a little cleaner is to use the delegate version of the on function so you don't have to have it inside your $.get callback.
Basically, that is like the old live() or delegate() function from previous jQuery versions. But I think this approach is more about personal preference than any real gain.
Eric Pascarello wrote:You could always trigger an event. Look at the API for trigger() and bind something to listen for the event.
Amateurs built google. Professionals built the titanic. We can't find the guy that built this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
|