Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 24cb0ca5dc
Fetching contributors…

Cannot retrieve contributors at this time

67 lines (60 sloc) 2.234 kb
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="" lang="pl" xml:lang="pl">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>rcarousel - load elements on demand</title>
<link type="text/css" rel="stylesheet" href="css/reset.css" />
<link type="text/css" rel="stylesheet" href="css/style.css" />
<link type="text/css" rel="stylesheet" href="../widget/css/rcarousel.css" />
<style type="text/css">
#carousel {
width: 300px;
<div id="header">
This is an example of <em>rcarousel</em> – a jQuery UI continuous carousel.
Go back to the <a href="">documentation</a>
<div id="content">
<h1>Loading elements on demand.</h1>
<div id="carousel">
<img src="images/001.jpg" />
<img src="images/002.jpg" />
<img src="images/003.jpg" />
<p><input type="button" name="but" id="but" value="load new elements from the server" /></p>
<p><em>May not work locally in some browsers.</em></p>
<script type="text/javascript" src="../widget/lib/jquery-1.7.1.js"></script>
<script type="text/javascript" src="../widget/lib/jquery.ui.core.js"></script>
<script type="text/javascript" src="../widget/lib/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../widget/lib/jquery.ui.rcarousel.js"></script>
<script type="text/javascript">
jQuery(function($) {
step: 1,
auto: {enabled: true}
function loadNew() {
var $img,
$jqElements = $();
function( data ) {
$.each(data.paths, function(i, item) {
$img = $( "<img />" ).attr( "src", item );
$jqElements = $jqElements.add( $img );
$( "#carousel" ).rcarousel( "append", $jqElements );
// load new element when clicked
$("#but").click( loadNew );
Jump to Line
Something went wrong with that request. Please try again.