Skip to content

Commit

Permalink
Updating ajax delegator docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
anutron committed Sep 13, 2013
1 parent 00f8a75 commit 0146e1d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Docs/Delegators/Delegator.Ajax.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ The above example will load the response from the links HREF (`get/list/item.php
* loadOnce - (*boolean*; optional) - if `true`, the link will only load content into its target once. Subsequent clicks are ignored (a console warning is displayed).
* throttle - (*number*; optional) - delays the ajax request and kills it if a subsequent request is made within this time frame (in ms). Defaults to 0 (i.e. no throttle).
* encode - (*string*; optional) - the selector to find an element to URL encode with the request at the time of invocation. Specify a selector to an input and only that input is sent. Any other DOM element encodes all of its children to send. Allows for the special selector "self" which encodes the element with the trigger on it.
* useSpinner - (*boolean*; optional) - if `true` uses an instance of the MooTools More Spinner class on the target.
* spinnerTarget - (*string*; optionals) - selector to find an alternate target for the spinner than the ajax update target.
* evalScripts - (*boolean*; optional) - if `true` evaluates scrips in the response.
* href - (*string*; optional) - specifies the url to fetch; defaults to the `href` property on the element.

### Actions

Expand Down
2 changes: 1 addition & 1 deletion Source/Delegators/Delegator.Ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ name: Delegator.Ajax

var requestTarget = new Element('div');

var spinnerTarget = api.get('spinner-target');
var spinnerTarget = api.get('spinnerTarget') || api.get('spinner-target'); //spinner-target is deprecated
if (spinnerTarget) spinnerTarget = link.getElement(spinnerTarget);

event.preventDefault();
Expand Down

0 comments on commit 0146e1d

Please sign in to comment.