jq之div hide slow
生活随笔
收集整理的這篇文章主要介紹了
jq之div hide slow
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
<!DOCTYPE html>
<html lang="en">
<head><meta charset="UTF-8"><title>jq之demo</title><!--線上jq庫--><script src="https://code.jquery.com/jquery-3.4.1.min.js"></script><script>$(document).ready(function(){$(".ex .hide").click(function () {/*隱藏當前的父文本內容*/$(this).parents(".ex").hide("slow");});});</script><style type="text/css">div.ex{background-color: #e5eecc;padding:7px;border:solid 1px #c3c3c3;}</style>
</head>
<body>
<h3>Goole</h3>
<div class="ex"><button class="hide">點我隱藏</button><p>站點名:百度<br/>url:https://www.baidu.com/?tn=40020637_10_oem_dg</p>
</div>
<h3>w3c</h3>
<div class="ex"><button class="hide">點我隱藏</button><p>站點名:b站<br/>url:https://www.bilibili.com/</p>
</div>
</body>
</html>
總結
以上是生活随笔為你收集整理的jq之div hide slow的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Python chr / ord 函数区
- 下一篇: try-catch 异常处理的执行过程