How to use
To use the slideshow:
- Download the script.
- Add an html div that will host the slideshow.
- Include the lwt-slideshow.js script loaded on your page's head element.
- Create the slideshow object (i.e. on the window.onload event).
HTML
Include lwt-slideshow.js on your page's head element:
<script language="javascript" src="js/lwt-slideshow.js"></script>
Add the following code somewhere on your page:
<div style="background-color: white; position: relative; width: 420px; height: 350px;"> <div style="position: absolute; width: 400px; height: 300px; margin: 10px;" id="lwt_slide_show"> <img id="the_image" style="" src="images/demo-photos/1.jpg" rel="lwt_slide_show_image"> </div> <div style="position: absolute; bottom: 10px; left: 10px;"> <a href="javascript:slideShow.next()">next</a> </div> </div>
Javascript
Create the slideshow instance:
window.onload = function () { slideShow = new LWTSlideShow(['images/demo-photos/1.jpg', 'images/demo-photos/2.jpg']); }
Digg it! -
Del.icio.us!