close

demo:http://www.healdream.com/upload/html/jquery/greybox/test.html
down:http://www.51files.com/?9UF4NA8RCRX5A0Z2F170
使用方法

<script type="text/javascript" src="../jquery.js"></script>
<script type="text/javascript" src="greybox.js"></script>
<link href="greybox.css" rel="stylesheet" type="text/css" media="all" />
<script type="text/javascript">
var GB_ANIMATION = true;
$(document).ready(function(){
$("a.greybox").click(function(){
var t = this.title || $(this).text() || this.href;
GB_show(t,this.href,450,600);
return false;
});
});
</script>
<script type="text/javascript" src="greybox.js"></script>
<link href="greybox.css" rel="stylesheet" type="text/css" media="all" />
<script type="text/javascript">
var GB_ANIMATION = true;
$(document).ready(function(){
$("a.greybox").click(function(){
var t = this.title || $(this).text() || this.href;
GB_show(t,this.href,450,600);
return false;
});
});
</script>
滿簡單的,將兩個js包含進來,然後鏈接css,最後對所有class為greybox的鏈接響應click事件,就KO了
本站備份下載...
全站熱搜