http://api.jquery.com/event.preventDefault/
“If this method is called, the default action of the event will not be triggered.”
“default action” means redirecting people from a different page when they click a hyperlink, as far as i observed in sample code.
is there any other use for this function?
how does it interact with forms?
As you said,
preventDefaultprevents the default action of the event from being triggered. The default action of the event depends on the type of event, and the event target.For example, if
preventDefaultwas used in a click event handler for a checkbox, the checkbox would not become checked upon click. If it was used in akeydownevent handler for an text input, the pressed key would not be written to the input value. If it was used in asubmitevent handler for a form, it would prevent the form from submitting.Basically, it stops any event from performing the action it would perform by default.