*/
/**
- * Attach a function to be executed before an AJAX request is send.
+ * Attach a function to be executed before an AJAX request is sent.
*
* The XMLHttpRequest and settings used for that request are passed
* as arguments to the callback.
* @example $("#msg").ajaxSend(function(request, settings){
* $(this).append("<li>Starting request at " + settings.url + "</li>");
* });
- * @desc Show a message before an AJAX request is send.
+ * @desc Show a message before an AJAX request is sent.
*
* @name ajaxSend
* @type jQuery
* the default content-type "application/x-www-form-urlencoded". If you want to send
* DOMDocuments, set this option to false.
*
- * (Boolean) async - By default, all requests are send asynchronous (set to true).
+ * (Boolean) async - By default, all requests are sent asynchronous (set to true).
* If you need synchronous requests, set this option to false.
*
* (Function) beforeSend - A pre-callback to set custom headers etc., the
* Returns -1 if the object wasn't found.
*
* @example $("*").index( $('#foobar')[0] )
- * @before <div id="foobar"></div><b></b><span id="foo"></span>
+ * @before <div id="foobar"><b></b><span id="foo"></span></div>
* @result 0
* @desc Returns the index for the element with ID foobar
*
- * @example $("*").index( $('#foo'))
- * @before <div id="foobar"></div><b></b><span id="foo"></span>
+ * @example $("*").index( $('#foo')[0] )
+ * @before <div id="foobar"><b></b><span id="foo"></span></div>
* @result 2
- * @desc Returns the index for the element with ID foo
+ * @desc Returns the index for the element with ID foo within another element
*
- * @example $("*").index( $('#bar'))
- * @before <div id="foobar"></div><b></b><span id="foo"></span>
+ * @example $("*").index( $('#bar')[0] )
+ * @before <div id="foobar"><b></b><span id="foo"></span></div>
* @result -1
* @desc Returns -1, as there is no element with ID bar
*