Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

65 lines (64 sloc) 2.22 kb
<!<!doctype html>
<html>
<head>
<title>JsSlideshow</title>
<script type="text/javascript" src="JsSlideshow.js">
</script>
<style type="text/css">
#slideshow {
height: 332px;
width: 332px;
overflow: hidden;
position: relative;
}
</style>
</head>
<body>
<div id="slideshow">
</div>
<div id="name">
</div>
The code needed:
<br/>
<pre>
var sl = new JsSlideshow({
target: "slideshow",
images: ["4504470765_90aa261be6.jpg", "images/4510204607_42bbb55d9c.jpg", "images/4510826808_f6edfc906a.jpg", "images/4513712885_0c008e3638.jpg"],
transition: 3000,
time: 2000,
url: "http://www.flickr.com/photos/bobowen"
});
</pre>
The images come from <a href="http://www.flickr.com/photos/bobowen">http://www.flickr.com/photos/bobowen</a>
and is shared a under Creative Commons Attribution.
<script type="text/javascript">
(function(){
var name = document.getElementById("name");
var sl = new JsSlideshow({
target: "slideshow",
images: [{
url: "images/4504470765_90aa261be6.jpg",
title: "foo1"
}, {
url: "images/4510204607_42bbb55d9c.jpg",
title: "foo2"
}, {
url: "images/4510826808_f6edfc906a.jpg",
title: "foo3"
}, {
url: "images/4513712885_0c008e3638.jpg",
title: "foo4"
}],
transition: 3000,
time: 2000,
url: "http://www.flickr.com/photos/bobowen",
listeners: {
slide: function(from, to){
name.innerHTML = to.title;
}
}
});
})();
</script>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.