我在我的banner.php里面是这样的
<div id="banner">
<script type="text/javascript" src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.js"></script>
<script type="text/javascript" src="<?php bloginfo('template_url'); ?>/js/webwidget_slideshow_dot.js"></script>
<script language="javascript" type="text/javascript">
$(function() {
$("#demo").webwidget_slideshow_dot({
slideshow_time_interval: '5000',
slideshow_window_width: '200',
slideshow_window_height: '200',
slideshow_title_color: '#17CCCC',
soldeshow_foreColor: '#000',
directory: 'images/'
});
});
</script>
<div id="demo" class="webwidget_slideshow_dot">
<ul>
<li><a href="link1" title="Sky"><img src="images/slideshow_large_1.jpg" width="407" height="301" alt="slideshow_large"/></a></li>
<li><a href="link2" title="Sea"><img src="images/slideshow_large_2.jpg" width="407" height="301" alt="slideshow_large"/></a></li>
<li><a href="link3" title="Flower"><img src="images/slideshow_large_3.jpg" width="407" height="301" alt="slideshow_large"/></a></li>
<li><a href="link4" title="Treelink4"><img src="images/slideshow_large_4.jpg" width="407" height="301" alt="slideshow_large"/></a></li>
</ul>
<div style="clear: both"></div>
</div>
</div>
这个是js文件:
(function(a){
a.fn.webwidget_slideshow_dot=function(p){
var p=p||{};
var m=p&&p.slideshow_time_interval?p.slideshow_time_interval:"2000";
var q=p&&p.slideshow_window_width?p.slideshow_window_width:"400";
var r=p&&p.slideshow_window_height?p.slideshow_window_height:"400";
var sf=p&&p.soldeshow_foreColor?p.soldeshow_foreColor:"#000";
var stc=p&&p.slideshow_title_color?p.slideshow_title_color:"#17CCCC";
var d=p&&p.directory?p.directory:"images/";
q += "px";