Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixing tabs in examples

  • Loading branch information...
commit e7a283b5df66641d4c1c65fdc7813f202732aee2 1 parent bbf0cc2
Aaron Newton authored
View
34 Docs/Behavior.Startup.md
@@ -5,23 +5,23 @@ Invokes delegators on startup when specified conditions are met. This allows you
### Example
- <input type="checkbox" data-trigger="toggleReveal" data-togglereveal-options="
- 'target': '.foo'
- " data-behavior="Startup" data-startup-options="
- 'delegators': {
- 'reveal': {
- 'target': 'self',
- 'property': 'checked'
- 'value': true
- },
- 'dissolve': {
- 'targets': '.severalThings',
- 'method': 'hasClass',
- 'arguments': ['.someClass'],
- 'value': true
- }
- }
- "/> enable
+ <input type="checkbox" data-trigger="toggleReveal" data-togglereveal-options="
+ 'target': '.foo'
+ " data-behavior="Startup" data-startup-options="
+ 'delegators': {
+ 'reveal': {
+ 'target': 'self',
+ 'property': 'checked'
+ 'value': true
+ },
+ 'dissolve': {
+ 'targets': '.severalThings',
+ 'method': 'hasClass',
+ 'arguments': ['.someClass'],
+ 'value': true
+ }
+ }
+ "/> enable
### Options
View
4 Docs/Behavior.md
@@ -433,8 +433,8 @@ Filters nearly always return instances of classes (this is essentially their pur
/* the matching HTML
<div data-behavior="Accordion" data-Accordion-togglers=".toggle" data-Accordion-sections=".section">
- <div class="toggle">Toggle 1</div>
- <div class="target">This area is controlled by Toggle 1.</div>
+ <div class="toggle">Toggle 1</div>
+ <div class="target">This area is controlled by Toggle 1.</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`).
View
10 Docs/BehaviorAPI.md
@@ -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:
- <tag data-behavior="Foo.Bar" data-foo-bar-options="'someThing': true">
- //and - note the hyphenation
- <tag data-behavior="Foo.Bar" data-foo-bar-some-thing="true">
+ <tag data-behavior="Foo.Bar" data-foo-bar-options="'someThing': true">
+ //and - note the hyphenation
+ <tag data-behavior="Foo.Bar" data-foo-bar-some-thing="true">
BehaviorAPI Method: get {#BehaviorAPI:get}
------------------------------------------
@@ -53,8 +53,8 @@ Gets a value for the specified name.
### Returns
* (*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).
- When more than one name is specified you'll receive an object response with key/value pairs for the name/property values.
+ 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.
BehaviorAPI Method: getAs {#BehaviorAPI:getAs}
------------------------------------------
View
6 Docs/Delegator.md
@@ -169,8 +169,8 @@ This is both a static method and an instance method. Using the static method (`D
### Syntax
- Delegator.getTrigger(name);
- myDelegator.getTrigger(name);
+ Delegator.getTrigger(name);
+ myDelegator.getTrigger(name);
### Arguments
@@ -182,7 +182,7 @@ This is both a static method and an instance method. Using the static method (`D
### 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();
myDelegator.attach(myContainerElement);
//this adds a global trigger
Please sign in to comment.
Something went wrong with that request. Please try again.