<?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 submit event of each matched element.' name='submit'>
<desc>Bind a function to the submit event of each matched element.</desc>
<params type='Function' name='fn'>
<desc>A function to bind to the submit event on each of the matched elements.</desc>
</params>
<examples>
<desc>Prevents the form submission when the input has no value entered.</desc>
<code>$("#myform").submit( function() {
  return $("input", this).val().length &gt; 0;
} );</code>
<before>&lt;form id="myform"&gt;&lt;input /&gt;&lt;/form&gt;</before>
</examples>
</method><method cat='Events' type='jQuery' short='Trigger the submit event of each matched element.' name='submit'>
<desc>Trigger the submit event of each matched element. This causes all of the functions
that have been bound to that submit event to be executed, and calls the browser's
default submit action on the matching element(s). This default action can be prevented
by returning false from one of the functions bound to the submit event.

Note: This does not execute the submit method of the form element! If you need to
submit the form via code, you have to use the DOM method, eg. $("form")[0].submit();</desc>
<examples>
<desc>Triggers all submit events registered to the matched form(s), and submits them.</desc>
<code>$("form").submit();</code>
</examples>
</method></docs>
