Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiewentw committed Feb 7, 2017
1 parent e5a0d3e commit 69d38c4
Showing 1 changed file with 23 additions and 25 deletions.
48 changes: 23 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ Prepare your data like this array:

~~~javascript
var fallwall_data = [
{ 0: "Eddie Wen", 1: "Hi~ I'm Eddie.", 2: "class_Wen" },
{ 0: "Jason Liu", 1: "Hi~ I'm Jason.", 2: "class_Liu" },
{ 0: "Steve Wang", 1: "Hi~ I'm Steve.", 2: "class_Wang" }
{ 0: 'Eddie Wen', 1: 'Hi~ I\'m Eddie.', 2: 'class_Wen' },
{ 0: 'Jason Liu', 1: 'Hi~ I\'m Jason.', 2: 'class_Liu' },
{ 0: 'Steve Wang', 1: 'Hi~ I\'m Steve.', 2: 'class_Wang' },
];
~~~

Expand All @@ -111,19 +111,6 @@ In this case, you will get this output:

----

### Options

* __gridNumber__: _Int_
How many grids do you want to generate everytime
* __columnNumber__: _Int_
Number of column in your element
* __defaultClass__: _String_
Default class you want be add on the grid.

My default class is `'animated zoomIn'` in the [DEMO](http://github.eddiewen.me/Fallwall.js/) page. That's [Animate.css](http://daneden.github.io/animate.css/)'s class. You could use this way to build animation.

----

### Functions

#### fallwall()
Expand All @@ -136,12 +123,23 @@ Example:
$('#element').fallwall( $('.template').html(), fallwall_data, {
gridNumber: 4,
columnNumber: 3,
defaultClass: 'animated zoomIn'
}, function() {
alert('Init is finished');
defaultClass: 'animated zoomIn',
}, () => {
console.log('Init is finished');
});
~~~

#### Options

* __gridNumber__: _Int_
How many grids do you want to generate everytime
* __columnNumber__: _Int_
Number of column in your element
* __defaultClass__: _String_
Default class you want be add on the grid.

My default class is `'animated zoomIn'` in the [DEMO](http://github.eddiewen.me/Fallwall.js/) page. That's [Animate.css](http://daneden.github.io/animate.css/)'s class. You could use this way to create animation.

----

#### loadMoreFw()
Expand All @@ -155,8 +153,8 @@ This function will return a String, `NO_MORE_DATA` or `FINISHED`. The latter mea
Example:

~~~javascript
$('#element').loadMoreFw( function() {
console.log('LOAD');
$('#element').loadMoreFw(() => {
console.log('LOADED');
});
~~~

Expand All @@ -173,10 +171,10 @@ Example:

~~~javascript
$('#element').addFwGrid({
0: "Mandy Chen",
1: "Hi~ I'm Mandy.",
2: "class_new"
}, function() {
0: 'Mandy Chen',
1: 'Hi~ I\'m Mandy.',
2: 'class_new',
}, () => {
console.log('ADD');
});
~~~

0 comments on commit 69d38c4

Please sign in to comment.