Or, to rephrase the question, "I know how to add event handlers to an object -- how do I enumerate what's already been attached?"
And it's pretty easy, but unfortunately it doesn't use a public API. Anyway, try this in Firebug:
If there are any events on that element, they'll be displayed. The only drawback is...you have to know exactly which element the events are attached to, or guess around a bit.
So I like jQuery. And I like Greasemonkey. I especially like the ability of Greasemonkey's ajax calls to go cross-domain. But how do I get access to this functionality in my event handlers? Calling GM_xmlhttprequest in a method that doesn't execute while the Greasemonkey sandbox is still alive doesn't work. At first I didn't think it was possible, but I discovered a way...using setInterval.
Note...this site is down for now...
You don't have to understand it to see that it's at least a bit interesting, so check it out:
It documents a bunch of different ways of doing similar things, and compares them in terms of performance. How much are you really losing by using the jQuery convenience method?
TODO: bring animations to charts in the Google Visualization API via jQuery to illustrate performance described in previous post.
TODO: write a series of test cases that illustrate ways to write high-performance jQuery.
I have many projects in progress...
1) "Anybody can program" book, have half of the outline for the first draft done
2) Stylometry web app, have some of the backend services done that calculate stylometry stats
a) Dictionary looker upper, reasonably complete for Merriam-Webster only
3) Blog application, just a few thoughts on paper and a few lines of code
4) Notepad, a note-keeping application, could pass for done
5) Merb Google RSS feed sample application, could pass for done
7) merb_solitary_part, a merb slice for hitting parts outside of "regular" requests. Needs some renaming/refactoring and some docs, but could pass for done
8 ) Kollaba, a site for finding collaborators to work on...anything. fair bit of progress on it, but probably dead.
9) merb-rails upload benchmark application, basically creating the same simple application in both versions. done enough to be used for benchmarks, at least (and yes, merb's faster).
Phew. I need to finish some stuff! But new ideas are so much more exciting...
Enter jquery_merb, or jquery.merb.js.
I'm writing a plugin right now to add some built-in JS functionality to Merb. It's coming along pretty well, but is still pretty raw and not specced, though it does have SOME documentation. It's available at http://github.com/nanodeath/merb_multi_js/wikis/home. If you have questions, you're encouraged to send me a message at Freenode#merb.
I wish Rails wasn't so intimately tied with Prototype+scriptaculous. It makes jQuery that much harder to use. Even so, using page << and jQuery is much easier than trying to use Prototype to achieve the same end. Not to be a fanboy or anything, but is there any other library out there that can remove a specific option from a dropdown select box in one short line of code?