图片轮换cycle插件的运用

时间:2022-11-24 20:03:22
 <!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>插件cycle的简单运用</title>
<style type="text/css">
#nav { margin: 5px; }
#nav a { margin: 5px; padding: 3px 5px; border: 1px solid #ccc; background: #fc0; text-decoration: none }
#nav a.activeSlide { background: #ea0 }
#nav a:focus { outline: none; }
</style>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5/jquery.min.js"></script>
<script type="text/javascript" src="http://malsup.github.com/chili-1.7.pack.js"></script>
<script type="text/javascript" src="http://malsup.github.com/jquery.cycle.all.js"></script>
<script type="text/javascript">
$(function() {
$('#slideshow').cycle({
speed: ,
timeout: ,
pager: '#nav',
// pagerEvent: 'mouseover',
pagerEvent: 'mouseenter.cycle',
pauseOnPagerHover: true
});
});
</script>
</head> <body>
<div id="nav"></div>
<div id="slideshow" class="pics">
<img src="http://malsup.github.com/images/beach1.jpg" width="" height="" />
<img src="http://malsup.github.com/images/beach2.jpg" width="" height="" />
<img src="http://malsup.github.com/images/beach3.jpg" width="" height="" />
<img src="http://malsup.github.com/images/beach4.jpg" width="" height="" />
<img src="http://malsup.github.com/images/beach5.jpg" width="" height="" />
<img src="http://malsup.github.com/images/beach6.jpg" width="" height="" />
<img src="http://malsup.github.com/images/beach7.jpg" width="" height="" />
</div>
<script type="text/javascript">
$(function(){
$('#slideshow').cycle({
speed: ,
timeout: ,
pager: '#nav',
pagerEvent: 'mouseover',
pauseOnPagerHover: true
});
});
</script>
</body>
</html>