1.在body里加入如下HTML代码:
<div class="changeBox_a1" id="change_1">
<a href="#1" class="a_bigImg">
<img src="images/1.jpg" width="650" height="250" alt="" />
</a>
<a href="#2" class="a_bigImg">
<img src="images/2.jpg" width="650" height="250" alt="" />
</a>
<a href="#3" class="a_bigImg">
<img src="images/3.jpg" width="650" height="250" alt="" />
</a>
<a href="#4" class="a_bigImg">
<img src="images/4.jpg" width="650" height="250" alt="" />
</a>
</div>
2.在head标签内加入css:
<style type="text/css">
.changeBox_a1
{
width:650px;
height:250px;
padding:2px;
position:relative;
border:1px solid #aaa;
}
.changeBox_a1 .a_bigImg
{
position:absolute;
top:2px;
left:2px;
display:none;
}
</style>
3.在head里引入js文件:
<script src="http://img.china-dirs.com.cn/public/js/jquery.js" type="text/javascript"></script>
<script src="http://img.china-dirs.com.cn/public/js/jquery.soChange.js" type="text/javascript"></script>
4.继续在head里加入js代码:
<script type="text/javascript">
$(function() {
$('#change_1 .a_bigImg').soChange();
})
</script>