rambling.slider
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:A CoffeeScript improved version of the jQuery NivoSlider
# jQuery Rambling Slider [![Build Status](https://travis-ci.org/gonzedge/rambling.slider.png)](https://travis-ci.org/gonzedge/rambling.slider)

The jQuery Rambling Slider is a CoffeeScript improved modified version of the [jQuery Nivo Slider](http://github.com/gilbitron/Nivo-Slider) by Gilbert Pellegrom, which is "The Most Awesome jQuery Image Slider".
It includes some new options and methods to give the slider the ability to adapt different image sizes, flash support and transitions extensions.

You can find more about it on [my blog](http://www.ramblinglabs.com/blog) or on [this repository's wiki](http://github.com/gonzedge/rambling.slider/wiki).

## How to use the jQuery Rambling Slider

The compiled JavaScript and CSS files, are in the `assets/` directory. Those are `assets/javascripts/jquery.rambling.slider.js` and `assets/stylesheets/jquery.rambling.slider.css` for development, as well as `assets/javascripts/jquery.rambling.slider.min.js` and `assets/stylesheets/jquery.rambling.slider.min.css` for production. The images for the different themes are under `assets/images`.

Include the files (either development or production) in your html, and assuming you have something that resembles this:

``` html
image1 image2 image3 image4
``` You can then initialize your slider with: ``` javascript $(window).load(function(){ $('#slider').ramblingSlider(); }); ``` Note that it's set up in the `load` event from `window`, to ensure that the images are already loaded. ### Examples There are usage examples available in the `examples/` directory. You might want to see `default.html`, `adaptive.html` and `flash.html`. ## Issues Please submit any issue you have or any bug that you find with the slider to [the project's issues on GitHub](http://github.com/gonzedge/rambling.slider/issues). ## Features Among others, the new features added on top of the Nivo Slider include: * `adaptImages`. __Default value:__ `false`. __Description:__ When set to `true`, uses images instead of backgrounds for the animations, and scales the images to the maximum dimension available. * `useLargerImage`. __Default value:__ `true`. __Description:__ When set to `true`, uses the larger image dimensions as the maximum dimension available. Otherwise, it uses the slider width as the maximum available. * `alignBottom`. __Default value:__ `false`. __Description:__ When set to `true`, aligns the bottom right corner of the scaled images with the bottom right corner of the slider. Otherwise, the images are aligned to the top left of the slider. * Methods `stop`, `start` can be called via `$('#slider').ramblingSlider('stop')` and allow method chaining. * Methods `option` and `effect` were added. Allow method chaining when calling the setters. * Method `destroy` was added and allows method chaining. * Methods `previousSlide`, `nextSlide` and `slide` were added and allow method chaining. * Method `theme` was added and allows method chaining. * Some new transitions: `foldLeft`, `rolloverLeft`, `rolloverRight`, `slideInRight`, `sliceUpRandom`, `sliceDownRandom`, `sliceUpDownRandom`, `foldRandom`, `sliceUpOutIn`, `sliceUpInOut`, `sliceDownOutIn`, `sliceDownInOut`, `sliceUpDownOutIn`, `sliceUpDownInOut`, `sliceFadeOutIn`, `sliceFadeInOut`, `foldOutIn`, `foldInOut`, `boxRainOutIn`, `boxRainInOut`, `boxRainGrowOutIn`, `boxRainGrowInOut`. * Support for transitions extensibility. See [Adding and Overriding Transitions](http://github.com/gonzedge/rambling.slider/wiki/Adding-and-Overriding-Transitions). * Support for flash elements. * `fadeOut`, `slideInRight` and `slideInLeft` transitions from image to flash object. * `slideInRight` and `slideInLeft` transitions from one flash object to another one. ## Supported jQuery versions The jQuery Rambling Slider has been tested with the following jQuery Releases: * 2.0.x * 1.10.x * 1.9.x * 1.8.x * 1.7.x Version `0.4.0` drops support for versions: * 1.6.x * 1.5.x * 1.4.x * 1.3.x For more info on the jQuery versions supported go to the [Supported jQuery Versions page](http://github.com/gonzedge/rambling.slider/wiki/Supported-jQuery-Versions). ## Contributing ### CoffeeScript and Gruntfile If you're interested in modifying or improving this script, you'll need to resolve these dependencies first: * NodeJS (`apt-get install nodejs`, `brew install node` for Mac OSX) * Node Package Manager (`apt-get install npm`, comes with `node` in Mac OSX) * CoffeeScript (`npm install -g coffee-script`) You will need to run this inside the project's root directory: ``` bash npm install ``` You can run the build like this: ``` bash grunt # or grunt default ``` ### Unit testing To run the tests, just run: ``` bash grunt spec ``` ## License and copyright Copyright (c) 2011-2013 Edgar Gonzalez MIT License 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: 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.

本源码包内暂不包含可直接显示的源代码文件,请下载源码包。