<?xml version='1.0' encoding='ISO-8859-1'?>
<?xml-stylesheet type='text/xsl' href='docs.xsl'?>
<docs>
<method cat='Events' type='jQuery' short='Bind a function to the load event of each matched element.' name='load'>
<desc>Bind a function to the load event of each matched element.</desc>
<params type='Function' name='fn'>
<desc>A function to bind to the load event on each of the matched elements.</desc>
</params>
<examples>
<code>$("p").load( function() { alert("Hello"); } );</code>
<result>&lt;p onload="alert('Hello');"&gt;Hello&lt;/p&gt;</result>
<before>&lt;p&gt;Hello&lt;/p&gt;</before>
</examples>
</method><method cat='Ajax' type='jQuery' short='Load HTML from a remote file and inject it into the DOM.' name='load'>
<desc>Load HTML from a remote file and inject it into the DOM.

Note: Avoid to use this to load scripts, instead use $.getScript.
IE strips script tags when there aren't any other characters in front of it.</desc>
<params type='String' name='url'>
<desc>The URL of the HTML file to load.</desc>
</params>
<params type='Object' name='params'>
<desc>(optional) A set of key/value pairs that will be sent as data to the server.</desc>
</params>
<params type='Function' name='callback'>
<desc>(optional) A function to be executed whenever the data is loaded (parameters: responseText, status and response itself).</desc>
</params>
<examples>
<code>$("#feeds").load("feeds.html");</code>
<result>&lt;div id="feeds"&gt;&lt;b&gt;45&lt;/b&gt; feeds found.&lt;/div&gt;</result>
<before>&lt;div id="feeds"&gt;&lt;/div&gt;</before>
</examples>
<examples>
<desc>Same as above, but with an additional parameter
and a callback that is executed when the data was loaded.</desc>
<code>$("#feeds").load("feeds.html",
  {limit: 25},
  function() { alert("The last 25 entries in the feed have been loaded"); }
);</code>
</examples>
</method></docs>
