<!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 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="document-title"> <a id="page-homeLink" href="../index.html" title="UIZE JavaScript Framework home"></a> <a href="../javascript-examples.html" class="breadcrumb breadcrumbWithArrow">JAVASCRIPT EXAMPLES</a> Slideshow <div id="page-actions" class="pageActions"> <a href="source-code/slideshow.html" class="buttonLink">SOURCE</a> </div> </h1> <div class="main"> <!-- 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> implied nodes, and the current slide number and total number of slides are reflected in the widget's <code>slideNumber</code> and <code>totalSlides</code> implied nodes.</p> </div> <div id="page_slideShow-shell"></div> </div> <!-- JavaScript code to wire up the page and insert the slideshow --> <script type="text/javascript"> Uize.module ({ required:[ 'UizeSite.Page.Example.library', 'UizeSite.Page.Example', 'Uize.Widget.SlideShow', 'UizeSite.TestDataPhotos', 'UizeSite.Templates.SlideShow.Basic' ], builder:function () { /*** 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.TestDataPhotos () } ); /*** wire up the page widget ***/ page.wireUi (); } }); </script> </body> </html>