SOURCE CODE: Slideshow

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
  <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=""/>
  <link rel="stylesheet" href="../css/page.css"/>
  <link rel="stylesheet" href="../css/page.example.css"/>
  <link rel="stylesheet" href="../css/widget.slideshow.css"/>


<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>

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

  <!-- 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 id="page-slideShow"></div>

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

<script type="text/javascript">

Uize.require (
  function () {
    'use strict';

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

    /*** add the slide show child widget ***/
      page.addChild (
          slides:UizeSite.TestData.Photos ()

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