works great. But if your selector is for a class, rather than an id, and you want to call load() for each selected element, this doesn't work (and I believe I understand why):
I know I could use explicit XHRs, or various other alternatives, all more complex than this load() call. What would be the elegant way to do what I want?
Ernest Friedman-Hill wrote:Awesome! This idea looks generally quite useful -- I didn't realize it worked this way at all.
Yeah, the load() method is defined on the jQuery wrapper object so you need to wrap this in the $() function to produce a wrapper that you can apply load() to.