greybox——不开新窗口看新的网页
greybox——不开新窗口看新的网页
发布时间:2016-12-30 来源:查字典编辑
摘要:demo:http://www.healdream.com/upload/html/jquery/greybox/test.htmldown...

demo:http://www.healdream.com/upload/html/jquery/greybox/test.html

down:http://www.51files.com/?9UF4NA8RCRX5A0Z2F170

使用方法

复制代码 代码如下:

<scripttype="text/javascript"src="../jquery.js"></script>

<scripttype="text/javascript"src="greybox.js"></script>

<linkhref="greybox.css"rel="stylesheet"type="text/css"media="all"/>

<scripttype="text/javascript">

varGB_ANIMATION=true;

$(document).ready(function(){

$("a.greybox").click(function(){

vart=this.title||$(this).text()||this.href;

GB_show(t,this.href,450,600);

returnfalse;

});

});

</script>

满简单的,将两个js包含进来,然后链接css,最后对所有class为greybox的链接响应click事件,就KO了

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新Javascript教程学习
热门Javascript教程学习
编程开发子分类