The jquery load method loads HTML from a remote file and injects it into the DOM. For example, to load the feeds.html file into the div with the ID of feeds, you would do this:
$("#feeds").load("feeds.html");
Is this an alternative to calling a partial with the Rails replace_html method or is the functionality slightly different?
page.replace_html 'feeds', :partial => 'main/feeds',
:locals => {:feed => @feed_data }
[EDIT]: As Craig Stuntz points out, replace_html returns Javascript instead of HTML - what's the advantage/disadvantage of this? Does it just mean that the fragment you return has more functional capabilities in the same way that a web page that uses Javascript is more powerful than a regular HTML page? Or is there some other reason for returning Javascript instead of HTML?