<?xml version='1.0' encoding='ISO-8859-1'?>
<?xml-stylesheet type='text/xsl' href='docs.xsl'?>
<docs>
<method cat='Events' type='jQuery' short='Binds a handler to a particular event (like click) for each matched element.' name='one'>
<desc>Binds a handler to a particular event (like click) for each matched element.
The handler is executed only once for each element. Otherwise, the same rules
as described in bind() apply.
	 The event handler is passed an event object that you can use to prevent
default behaviour. To stop both default action and event bubbling, your handler
has to return false.

In most cases, you can define your event handlers as anonymous functions
(see first example). In cases where that is not possible, you can pass additional
data as the second paramter (and the handler function as the third), see 
second example.</desc>
<params type='String' name='type'>
<desc>An event type</desc>
</params>
<params type='Object' name='data'>
<desc>(optional) Additional data passed to the event handler as event.data</desc>
</params>
<params type='Function' name='fn'>
<desc>A function to bind to the event on each of the set of matched elements</desc>
</params>
<examples>
<code>$("p").one("click", function(){
  alert( $(this).text() );
});</code>
<result>alert("Hello")</result>
<before>&lt;p&gt;Hello&lt;/p&gt;</before>
</examples>
</method></docs>
