Skip to content

Commit

Permalink
fixing tabs in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
anutron committed Dec 20, 2011
1 parent bbf0cc2 commit e7a283b
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 27 deletions.
34 changes: 17 additions & 17 deletions Docs/Behavior.Startup.md
Expand Up @@ -5,23 +5,23 @@ Invokes delegators on startup when specified conditions are met. This allows you


### Example ### Example


<input type="checkbox" data-trigger="toggleReveal" data-togglereveal-options=" <input type="checkbox" data-trigger="toggleReveal" data-togglereveal-options="
'target': '.foo' 'target': '.foo'
" data-behavior="Startup" data-startup-options=" " data-behavior="Startup" data-startup-options="
'delegators': { 'delegators': {
'reveal': { 'reveal': {
'target': 'self', 'target': 'self',
'property': 'checked' 'property': 'checked'
'value': true 'value': true
}, },
'dissolve': { 'dissolve': {
'targets': '.severalThings', 'targets': '.severalThings',
'method': 'hasClass', 'method': 'hasClass',
'arguments': ['.someClass'], 'arguments': ['.someClass'],
'value': true 'value': true
} }
} }
"/> enable "/> enable


### Options ### Options


Expand Down
4 changes: 2 additions & 2 deletions Docs/Behavior.md
Expand Up @@ -433,8 +433,8 @@ Filters nearly always return instances of classes (this is essentially their pur


/* the matching HTML /* the matching HTML
<div data-behavior="Accordion" data-Accordion-togglers=".toggle" data-Accordion-sections=".section"> <div data-behavior="Accordion" data-Accordion-togglers=".toggle" data-Accordion-sections=".section">
<div class="toggle">Toggle 1</div> <div class="toggle">Toggle 1</div>
<div class="target">This area is controlled by Toggle 1.</div> <div class="target">This area is controlled by Toggle 1.</div>
</div> */ </div> */


In the example above our filter finds the sections and togglers and validates that there is at least one of each. If there aren't it calls `api.fail` - this stops the filter's execution and Behavior.js catches it and calls its `onError` event (which defaults to `console.error`). It also checks if the number of togglers and the number of sections are equal and calls `api.warn` if they are off. This does *not* top execution; it only fires the `onWarn` event on Behavior (which defaults to `console.warn`). In the example above our filter finds the sections and togglers and validates that there is at least one of each. If there aren't it calls `api.fail` - this stops the filter's execution and Behavior.js catches it and calls its `onError` event (which defaults to `console.error`). It also checks if the number of togglers and the number of sections are equal and calls `api.warn` if they are off. This does *not* top execution; it only fires the `onWarn` event on Behavior (which defaults to `console.warn`).
Expand Down
10 changes: 5 additions & 5 deletions Docs/BehaviorAPI.md
Expand Up @@ -27,9 +27,9 @@ If you attempt to read a value that isn't defined in this options object, the pr


Note that filter names that contain characters other than A-Z, 0-9, or dash are stripped and what remains is case insensitive. Dots are turned to dashes. Further, camelCase properties are hyphenated to camel-case. So, for example, you would express the following: Note that filter names that contain characters other than A-Z, 0-9, or dash are stripped and what remains is case insensitive. Dots are turned to dashes. Further, camelCase properties are hyphenated to camel-case. So, for example, you would express the following:


<tag data-behavior="Foo.Bar" data-foo-bar-options="'someThing': true"> <tag data-behavior="Foo.Bar" data-foo-bar-options="'someThing': true">
//and - note the hyphenation //and - note the hyphenation
<tag data-behavior="Foo.Bar" data-foo-bar-some-thing="true"> <tag data-behavior="Foo.Bar" data-foo-bar-some-thing="true">


BehaviorAPI Method: get {#BehaviorAPI:get} BehaviorAPI Method: get {#BehaviorAPI:get}
------------------------------------------ ------------------------------------------
Expand All @@ -53,8 +53,8 @@ Gets a value for the specified name.
### Returns ### Returns


* (*mixed*) Values defined as strings will be returned as strings. Values defined in JSON will be returned as their * (*mixed*) Values defined as strings will be returned as strings. Values defined in JSON will be returned as their
type is evaluated. When you expect anything other than a string it's better to use [getAs](#BehaviorAPI:getAs). type is evaluated. When you expect anything other than a string it's better to use [getAs](#BehaviorAPI:getAs).
When more than one name is specified you'll receive an object response with key/value pairs for the name/property values. When more than one name is specified you'll receive an object response with key/value pairs for the name/property values.


BehaviorAPI Method: getAs {#BehaviorAPI:getAs} BehaviorAPI Method: getAs {#BehaviorAPI:getAs}
------------------------------------------ ------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions Docs/Delegator.md
Expand Up @@ -169,8 +169,8 @@ This is both a static method and an instance method. Using the static method (`D


### Syntax ### Syntax


Delegator.getTrigger(name); Delegator.getTrigger(name);
myDelegator.getTrigger(name); myDelegator.getTrigger(name);


### Arguments ### Arguments


Expand All @@ -182,7 +182,7 @@ This is both a static method and an instance method. Using the static method (`D


### Examples ### Examples


//this is the same example as the one at the top of the page //this is the same example as the one at the top of the page
var myDelegator = new Delegator(); var myDelegator = new Delegator();
myDelegator.attach(myContainerElement); myDelegator.attach(myContainerElement);
//this adds a global trigger //this adds a global trigger
Expand Down

0 comments on commit e7a283b

Please sign in to comment.