DIR : /home/kozerus/public_html/pn/uize/site-source/examples/slideshow.html

/home/kozerus/public_html/pn/uize/site-source/examples

<!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">
<head>
	<title>Slideshow | JavaScript Examples | UIZE JavaScript Framework</title>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta name="keywords" content="slideshow Uize.Widget.SlideShow"/>
	<meta name="description" content="See an example of a barebones JavaScript slideshow widget, with navigation buttons, basic display of image, title, slide number, and total slides."/>
	<link rel="alternate" type="application/rss+xml" title="UIZE JavaScript Framework - Latest News" href="http://www.uize.com/latest-news.rss"/>
	<link rel="stylesheet" href="../css/page.css"/>
	<link rel="stylesheet" href="../css/page.example.css"/>
	<link rel="stylesheet" href="../css/widget.slideshow.css"/>
</head>

<body>

<script type="text/javascript" src="../js/Uize.js"></script>

<h1 class="header">
	<a id="page-homeLink" href="../index.html" title="UIZE JavaScript Framework home"></a>
	<a href="../index.html" class="homeLinkText" title="UIZE JavaScript Framework home">UIZE JavaScript Framework</a>
</h1>

<div class="main">
	<h1 class="document-title">
		<a href="../javascript-examples.html" class="breadcrumb breadcrumbWithArrow">JAVASCRIPT EXAMPLES</a>
		Slideshow
		<div class="pageActionsShell">
			<div id="page-actions" class="pageActions"><a href="source-code/slideshow.html" class="buttonLink">SOURCE</a></div>
		</div>
	</h1>

	<!-- explanation copy -->

	<div class="explanation">
		<p>In this example, an instance of the <a href="../reference/Uize.Widget.SlideShow.html"><code>Uize.Widget.SlideShow</code></a> widget class is wired up, initialized with an array of photos by setting its <code>slides</code> state property. Each record in the slides array contains <code>title</code> and <code>image</code> properties. The slideshow widget wires up buttons for navigating the slides. When a slide is selected, the value of the slide's record's <code>title</code> and <code>image</code> properties are displayed in the widget's <code>slide_title</code> and <code>slide_image</code> DOM nodes, and the current slide number and total number of slides are reflected in the widget's <code>slideNumber</code> and <code>totalSlides</code> DOM nodes.</p>
	</div>

	<div id="page-slideShow"></div>
</div>

<!-- JavaScript code to wire up the page and insert the slideshow -->

<script type="text/javascript">

Uize.require (
	[
		'UizeSite.Page.Example.library',
		'UizeSite.Page.Example',
		'Uize.Widget.SlideShow',
		'UizeSite.TestData.Photos',
		'UizeSite.Templates.SlideShow.Basic'
	],
	function () {
		'use strict';

		/*** create the example page widget ***/
			var page = window.page = UizeSite.Page.Example ();

		/*** add the slide show child widget ***/
			page.addChild (
				'slideShow',
				Uize.Widget.SlideShow,
				{
					built:false,
					html:UizeSite.Templates.SlideShow.Basic,
					width:500,
					height:357,
					slides:UizeSite.TestData.Photos ()
				}
			);

		/*** wire up the page widget ***/
			page.wireUi ();
	}
);

</script>

</body>
</html>

//


koh5_pano



Your browser does not support the HTML5 canvas element.


Drag mouse to navigate.

Navigation





17.Aug.2010, Martin Wengenmayer