Permalink
Browse files

Update examples

  • Loading branch information...
1 parent 1b557ee commit f843e82a9f20e1a040176c5c598cc5039430c34c @colintoh committed Sep 17, 2014
Showing with 20 additions and 20 deletions.
  1. +9 −9 README.md
  2. +10 −10 app/assets/index.html
  3. +1 −1 app/templates/home.hbs
View
@@ -17,7 +17,7 @@ Download [skylo.js](https://github.com/colintoh/skylo/blob/master/vendor/scripts
Options
--------
//Default options
- $(document).skylo({
+ $.skylo({
state: 'info',
inchSpeed: 200,
initialBurst: 5,
@@ -38,34 +38,34 @@ Methods
-------
```start```: This will initiate the loader with a initial burst of length.
- $(document).skylo('start');
+ $.skylo('start');
```end```: The loader will reach 100% and then fade out.
- $(document).skylo('end');
+ $.skylo('end');
```set(width)```: The loader's width will be animated to the percentage stated. Ranges from 1 - 100.
- $(document).skylo('set',50); //Set width to 50%
+ $.skylo('set',50); //Set width to 50%
```get```: Returns the current loader's width percentage.
- $(document).skylo('get');
+ $.skylo('get');
```inch```: Loader will inch forward according to the parameters set.
- $(document).skylo('inch',10); //Inch forward by 10%
+ $.skylo('inch',10); //Inch forward by 10%
```show(callback)```: Loader will be inserted into the DOM and a callback function will be called.
- $(document).skylo('show',function(){
+ $.skylo('show',function(){
//After inserting Loader, animates width to 30%
- $(document).skylo('set',30);
+ $.skylo('set',30);
});
```remove```: Remove Loader from the DOM. Normally unused. Just use ```end`` method to complete the animation.
- $(document).skylo('end');
+ $.skylo('end');
---
View
@@ -25,39 +25,39 @@
$(function(){
$('#demo').on('click',function(){
- $(document).skylo('start');
+ $.skylo('start');
setTimeout(function(){
- $(document).skylo('set',50);
+ $.skylo('set',50);
},1000);
setTimeout(function(){
- $(document).skylo('end');
+ $.skylo('end');
},1500);
});
$('#start').on('click',function(){
- $(document).skylo('start');
+ $.skylo('start');
});
$('#end').on('click',function(){
- $(document).skylo('end');
+ $.skylo('end');
});
$('#set').on('click',function(){
- $(document).skylo('show',function(){
- $(document).skylo('set',50);
+ $.skylo('show',function(){
+ $.skylo('set',50);
});
});
$('#get').on('click',function(){
- alert($(document).skylo('get')+'%');
+ alert($.skylo('get')+'%');
});
$('#inch').on('click',function(){
- $(document).skylo('show',function(){
- $(document).skylo('inch',10);
+ $.skylo('show',function(){
+ $.skylo('inch',10);
});
});
@@ -160,7 +160,7 @@ PaulvdDool
<div class="code col-md-12 full-code">
//Default Values <br>
<br>
- $(document).skylo({ <br>
+ $.skylo({ <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'state': 'info', <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'inchSpeed': 200, <br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;'initialBurst': 5, <br>

0 comments on commit f843e82

Please sign in to comment.