PHP Classes

File: photos-jquery.php

Recommend this page to a friend!
  Classes of Barton Phillips  >  Slide Show  >  photos-jquery.php  >  Download  
File: photos-jquery.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Slide Show
Present a slide show of local or remote images
Author: By
Last change:
Date: 6 years ago
Size: 1,754 bytes


Class file image Download

$ss = new SlideShow('loc', './images', false); //'url', '')
$names = $ss->getImageNames();
//$names = explode(',', $imageNames);

echo <<<EOF
<!DOCTYPE html>
<html lang="en">
  <title>Photo Slide Show Demo</title>
  <!-- jQuery -->
  <script src=""></script>
// Initialize the SlideShow object. See SlideShow.js for
// information on initialization process.

jQuery(document).ready(function($) {
  var names = [

  function next(i) {
// $("#slideshow").html("<img src='"+names[i]+"'>");
    $("#slideshow").html("<img src='SlideShow.class.php?mode=proxy&path="+names[i]+"'>");
    if(++i >= names.length) {
      i = 0;
    setTimeout(function() {
    }, 5000);


#slideshow {
        position: relative;
#slideshow img {
        max-height: 700px;
#footer {
        border: 1px solid back;
        background-color: green;
        color: white;
        margin: 10px;
        width: auto;
#errors {
        border: 1px solid red;
        margin-left: 0;
        width: 500px;
        margin-right: auto;
        margin-top: 40px;
        margin-bottom: 40px;
        height: auto;
        text-aligh: center;
        display: none;
        overflow: auto;

<!-- The on load here activates the setObserverIndex() in the head.
The SlideShow.php script sets another load for the init() method via the
DOM event module. Both events are fired on load. -->

<div id="slideshow" style="border: 4px solid black"></div>

For more information send a message to info at phpclasses dot org.