Using jQuery Auto Image Scroller

Chandrakanth
Posted by Chandrakanth under jQuery category on | Points: 40 | Views : 1910
<!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" xml:lang="en-us">
<head>
<title>jCarousel Examples</title>
<link href="../style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="jquery-1.2.3.pack.js ">
</script>
<script type="text/javascript" src="jquery.jcarousel.pack.js ">
</script>
<link rel="stylesheet" type="text/css" href="jquery.jcarousel.css " />
<link rel="stylesheet" type="text/css" href="skin.css " />
<script type="text/javascript">
function mycarousel_initCallback(carousel) {
// Disable autoscrolling if the user clicks the prev or next button.
carousel.buttonNext.bind('click', function () {
carousel.startAuto(0);
});

carousel.buttonPrev.bind('click', function () {
carousel.startAuto(0);
});

// Pause autoscrolling if the user moves with the cursor over the clip.
carousel.clip.hover(function () {
carousel.stopAuto();
}, function () {
carousel.startAuto();
});
};

jQuery(document).ready(function () {
jQuery('#mycarousel').jcarousel({
auto: 2,
wrap: 'last',
initCallback: mycarousel_initCallback
});
});

</script>
</head>
<body>
<div id="wrap">
<ul id="mycarousel" class="jcarousel-skin-tango">
<li>
<img src="Images/window8-1.jpg" width="75" height="100" alt="i1" />
</li>
<li>
<img src="Images/window8-2.jpg" width="75" height="100" alt="i2" />
</li>
<li>
<img src="Images/window8-3.jpg" width="75" height="100" alt="i3" />
</li>
<li>
<img src="Images/window8-4.jpg" width="75" height="100" alt="i4" />
</li>
</ul>
</div>
</body>
</html>

Comments or Responses

Login to post response