Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tulios committed Mar 20, 2014
1 parent 3a7cc4a commit 5f4bcf7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 210 deletions.
41 changes: 19 additions & 22 deletions COPYING
@@ -1,24 +1,21 @@
Copyright (c) 2012-2013, Globo.com - Webmedia
All rights reserved.
Copyright 2012-2014 Túlio Ornelas. http://github.com/tulios

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the Globo.com - Webmedia nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
MIT
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL GLOBO.COM - WEBMEDIA BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
189 changes: 1 addition & 188 deletions README.md
Expand Up @@ -2,194 +2,7 @@
### A smart and very extensible sliding carousel

SilverTrack is a jQuery plugin designed to be extensible through other plugins. It has a small core and comes with very useful plugins.
Refer to the [jQuery SilverTrack website](http://tulios.github.com/jquery.silver_track/) for examples.

#### Built-in plugins
* [BulletNavigator](https://github.com/tulios/jquery.silver_track/blob/master/src/plugins/jquery.silver_track.bullet_navigator.js)
* [Navigator](https://github.com/tulios/jquery.silver_track/blob/master/src/plugins/jquery.silver_track.navigator.js)
* [RemoteContent](https://github.com/tulios/jquery.silver_track/blob/master/src/plugins/jquery.silver_track.remote_content.js)
* [ResponsiveHubConnector](https://github.com/tulios/jquery.silver_track/blob/master/src/plugins/jquery.silver_track.responsive_hub_connector.js)

## Browser Compatibility

TODO:

## Dependencies

* [jQuery](http://jquery.com) 1.7.2+
* [jQuery Easing 1.3](http://gsgd.co.uk/sandbox/jquery/easing/) for custom easing

PS: The ResponsiveHubConnector plugin requires the dependencies of [ResponsiveHub](https://github.com/globocom/responsive-hub)

## Usage

TODO:

### Configuration Options

TODO: update!

<table>
<tr>
<th>Name</th>
<th>Default</th>
<th>Description</th>
</tr>
<tr>
<td>perPage</td>
<td>4</td>
<td>The amount of itens to display</td>
</tr>
<tr>
<td>itemClass</td>
<td>'item'</td>
<td>The class name that will be used to find the item</td>
</tr>
<tr>
<td>cover</td>
<td>false</td>
<td>When set to true, the plugin will consider the first page as a cover and will consider it as one item</td>
</tr>
<tr>
<td>mode</td>
<td>'horizontal'</td>
<td></td>
</tr>
<tr>
<td>autoHeight</td>
<td>false</td>
<td></td>
</tr>
<tr>
<td>duration</td>
<td>'slow'</td>
<td></td>
</tr>
<tr>
<td>easing</td>
<td>'swing'</td>
<td></td>
</tr>
</table>

### Methods

<table>
<tr>
<th>Name</th>
<th>Description</th>
<th>Parameters</th>
</tr>
<tr>
<td>start</td>
<td>Starts SilverTrack</td>
<td></td>
</tr>
<tr>
<td>goToPage</td>
<td>Goes to a specific page when it exists</td>
<td>page</td>
</tr>
<tr>
<td>next</td>
<td>Goes to the next page when it exists</td>
<td></td>
</tr>
<tr>
<td>prev</td>
<td>Goes to the previous page when it exists</td>
<td></td>
</tr>
<tr>
<td>hasNext</td>
<td>Returns true if next page exist</td>
<td></td>
</tr>
<tr>
<td>hasPrev</td>
<td>Returns true if previous page exist</td>
<td></td>
</tr>
<tr>
<td>restart</td>
<td>Restarts the position of the items, goes to the first page</td>
<td></td>
</tr>
<tr>
<td>install</td>
<td>Installs a plugin. Check out the plugins section to see which callbacks are available</td>
<td>plugin</td>
</tr>
<tr>
<td>reloadItems</td>
<td></td>
<td></td>
</tr>
<tr>
<td>updateTotalPages</td>
<td></td>
<td>totalPages</td>
</tr>
</table>

## Plugin creation

TODO:

### Definition

```js
(function ($, window, document) {

$.silverTrackPlugin("PluginName", {
defaults: {
attribute: "default value"
},

/*
* With merged options
*/
constructor: function(options) {},

onInstall: function(track) {},
beforeStart: function(track) {},
afterStart: function(track) {},
afterRestart: function(track) {},
onTotalPagesUpdate: function(track){},

/* Event format
* {
* name: "prev", // or "next"
* page: 1,
* cover: false,
* items: []
* }
*/
beforeAnimation: function(track, event) {},
afterAnimation: function(track, event) {},
beforePagination: function(track, event) {},

/* Event format
* {
* items: [],
* newHeight: 150
* }
*/
beforeAdjustHeight: function(track, event) {},
afterAdjustHeight: function(track, event) {}
});

})(jQuery, window, document);
```

### Install

```js
track.install(new SilverTrack.Plugins.PluginName({
attribute: "different value from default"
}));

```
Refer to the [jQuery SilverTrack website](http://tulios.github.com/jquery.silver_track/) for documentation and examples.

## Tests

Expand Down

0 comments on commit 5f4bcf7

Please sign in to comment.