jCarousel Examples in jCarousel 6
Same filename in this branch
- 6 jcarousel/examples/static_simple.html
- 6 jcarousel/examples/static_start.html
- 6 jcarousel/examples/special_textscroller.html
- 6 jcarousel/examples/dynamic_flickr_feed.html
- 6 jcarousel/examples/dynamic_ajax_php.html
- 6 jcarousel/examples/special_easing.html
- 6 jcarousel/examples/static_auto.html
- 6 jcarousel/examples/dynamic_ajax.html
- 6 jcarousel/examples/static_multiple.html
- 6 jcarousel/examples/dynamic_javascript.html
- 6 jcarousel/examples/dynamic_flickr_api.html
- 6 jcarousel/examples/special_circular.html
- 6 jcarousel/examples/special_thickbox.html
- 6 jcarousel/examples/special_flexible.html
- 6 jcarousel/examples/static_controls.html
- 6 jcarousel/examples/static_callbacks.html
- 6 jcarousel/examples/static_vertical.html
Riding carousels with jQuery
Carousel with custom animation effect
This example shows how to use custom animation effects (uses Robert Penners easing equations).
File
jcarousel/examples/special_easing.htmlView source
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-us"> <head> <title>jCarousel Examples</title> <link href="../style.css" rel="stylesheet" type="text/css" /> <!-- jQuery library --> <script type="text/javascript" src="../lib/jquery-1.2.3.pack.js"></script> <!-- jCarousel library --> <script type="text/javascript" src="../lib/jquery.jcarousel.pack.js"></script> <!-- jCarousel core stylesheet --> <link rel="stylesheet" type="text/css" href="../lib/jquery.jcarousel.css" /> <!-- jCarousel skin stylesheet --> <link rel="stylesheet" type="text/css" href="../skins/tango/skin.css" /> <script type="text/javascript"> // Credits: Robert Penners easing equations (http://www.robertpenner.com/easing/). jQuery.easing['BounceEaseOut'] = function(p, t, b, c, d) { if ((t/=d) < (1/2.75)) { return c*(7.5625*t*t) + b; } else if (t < (2/2.75)) { return c*(7.5625*(t-=(1.5/2.75))*t + .75) + b; } else if (t < (2.5/2.75)) { return c*(7.5625*(t-=(2.25/2.75))*t + .9375) + b; } else { return c*(7.5625*(t-=(2.625/2.75))*t + .984375) + b; } }; jQuery(document).ready(function() { jQuery('#mycarousel').jcarousel({ easing: 'BounceEaseOut', animation: 1000 }); }); </script> </head> <body> <div id="wrap"> <h1>jCarousel</h1> <h2>Riding carousels with jQuery</h2> <h3>Carousel with custom animation effect</h3> <p> This example shows how to use custom animation effects (uses <a href="http://www.robertpenner.com/easing/">Robert Penners easing equations</a>). </p> <ul id="mycarousel" class="jcarousel-skin-tango"> <li><img src="http://static.flickr.com/66/199481236_dc98b5abb3_s.jpg" width="75" height="75" alt="" /></li> <li><img src="http://static.flickr.com/75/199481072_b4a0d09597_s.jpg" width="75" height="75" alt="" /></li> <li><img src="http://static.flickr.com/57/199481087_33ae73a8de_s.jpg" width="75" height="75" alt="" /></li> <li><img src="http://static.flickr.com/77/199481108_4359e6b971_s.jpg" width="75" height="75" alt="" /></li> <li><img src="http://static.flickr.com/58/199481143_3c148d9dd3_s.jpg" width="75" height="75" alt="" /></li> <li><img src="http://static.flickr.com/72/199481203_ad4cdcf109_s.jpg" width="75" height="75" alt="" /></li> <li><img src="http://static.flickr.com/58/199481218_264ce20da0_s.jpg" width="75" height="75" alt="" /></li> <li><img src="http://static.flickr.com/69/199481255_fdfe885f87_s.jpg" width="75" height="75" alt="" /></li> <li><img src="http://static.flickr.com/60/199480111_87d4cb3e38_s.jpg" width="75" height="75" alt="" /></li> <li><img src="http://static.flickr.com/70/229228324_08223b70fa_s.jpg" width="75" height="75" alt="" /></li> </ul> </div> </body> </html>