Jquery的hide及toggle方法让超链接慢慢消失
Jquery的hide及toggle方法让超链接慢慢消失
发布时间:2017-01-14 来源:查字典编辑
摘要:复制代码代码如下:$(this).hide("slow");复制代码代码如下:helloworld$(document).ready(fun...

复制代码 代码如下:

$(this).hide("slow");

复制代码 代码如下:

<!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=gb2312" />

<title>hello world</title>

<script type="text/javascript" src="http://www.cssrain.cn/demo/jquery.js"></script>

<script type="text/javascript">

$(document).ready(function(){

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

$(this).hide("slow");

return false;

});

});

</script>

</head>

<body>

<a href="http://www.cssrain.cn">

Effects Module(效果模块)

现在,只要你点击超链接,超链接就会慢慢的消失。

“return false"表示保留默认行为,因此页面不会跳转。

</a>

<hr/>

<a href="http://www.baidu.com">我也是一个段落文本,单击我也弹出hello world .---单击我</a>

</body>

</html>

3、点击text图片消失

1

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