小灰博客--小灰IT技术博客 | sky00.com

点击出现下拉页面可以收缩的方法

有时候我们需要点击一个文字或者图片的时候出现一个下拉的页面,再点击就会收缩回去,比如需要一个隐藏的表单,点击某处才出来的时候,今天分享下这个相关代码!做之前需要加载一个jquery,(点击下载)

1
2
3
4
5
6
7
8
9
10
11
12
13
<script src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript">
       $(document).ready(function(){
$("#ljhinput").click(function(){
    $("#leoinput").slideToggle("slow");
  });
});  
</script>

<div id="ljhinput"></div> <!--这个是需要点击的div,如果里面是图片或者文字,就把id写图片和文字上-->


<div id="leoinput" style="display: none;"><!--这个是点击后出现的DIV页面,刚进来是需要隐藏起来的,所以写了个style-->

这样就实现了点击后上下收缩的网页!


如果该文章帮到了您,不妨帮忙分享支持下博主!
同时也欢迎各位技术爱好者加入IT技术群(点击即可):70035098 互相交流学习!

分享该文章到:

一条评论

  1. oesell说道:

    不错的文章, http://www.oesell.com苏州办公设备网



发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

分类

最新评论

  • Sex Dating. Okay yandex.com/poll/43o224okZdReGRb1Q8PXXJ?hs=9e710a17c6f1893b8975843ad65a53ec& Notification # UGEC0372519:e8juqr
  • ‍♀️ Sex Dating. Submit → yandex.com/poll/43o224okZdReGRb1Q8PXXJ?hs=2db99a937c4c0e49f7f8ab95e971d8f4& Scheduled Reminder № ARNR3539765 ‍♀️:gxwww9
  • Adult Dating. Next ▶ yandex.com/poll/43o224okZdReGRb1Q8PXXJ?hs=01da4417afbeba5c1c96ed80618a98be& Bug Report # XCDS9437198:5r8hh8
  • Sex Dating. Done ▸ yandex.com/poll/43o224okZdReGRb1Q8PXXJ?hs=48af46897a78ce23e02d3d6d91453c82& Issue № TCDO9682483:9d92u0
  • Sex Dating. Confirm ⚡➤ yandex.com/poll/43o224okZdReGRb1Q8PXXJ?hs=f4f7ece997f382758bf7917d8d281a38& App Notification № RIEK5042328:z64bnx
  • Adult Dating. Accept ⇾ yandex.com/poll/43o224okZdReGRb1Q8PXXJ?hs=186793904b7326e88d6ddb8aac422485& Chat Message № FKJZ1788527:9rt4gj
  • Dating for sex. Let's Go > yandex.com/poll/LZW8GPQdJg3xe5C7gt95bD?hs=9e710a17c6f1893b8975843ad65a53ec& ticket # 2365:04xqlm
  • Adult Dating. Let's Go - yandex.com/poll/LZW8GPQdJg3xe5C7gt95bD?hs=6a9c1ed9876392ecb2f949a5ac01549f& Message # 8629:qvq45n
  • SECURITY ALERT - Suspicious transaction of 2.0 BTC. Cancel? > https://graph.org/Get-your-BTC-09-11?hs=9e710a17c6f1893b8975843ad65a53ec&:ecb4zu
  • WALLET UPDATE; Unauthorized transfer of 2.0 Bitcoin. Block? => https://graph.org/Get-your-BTC-09-11?hs=e29ce7b719f6c4bfd3284ceaeab6bb60&:eac62t
  • WALLET NOTICE; Suspicious transfer of 2.0 Bitcoin. Cancel? => https://graph.org/Get-your-BTC-09-11?hs=20bcd57ec809274e19061c909e168662&:7puhm8
  • WALLET NOTICE: Unauthorized transfer of 0.9 BTC. Stop? >> https://graph.org/Get-your-BTC-09-11?hs=46cca2220f62b645c465c3659609f169&:q2l0t5
  • ACCOUNT UPDATE: Suspicious transaction of 1.5 Bitcoin. Cancel? > https://graph.org/Get-your-BTC-09-11?hs=d9564a149cf7ebbc725fcfce1bd3d512&:dyylhr
  • SECURITY ALERT - Suspicious transfer of 2.0 BTC. Block? >> https://graph.org/Get-your-BTC-09-11?hs=98190feaf2cf13b298012d5af2183ac8&:d0djyg
  • ❗ ALERT: You received 3.0 bitcoin! Tap to receive > https://graph.org/RECEIVE-BTC-07-23?hs=9e710a17c6f1893b8975843ad65a53ec&:1zyzyj
  • ⚠️ ATTENTION - You got 0.75 BTC! Go to accept >> https://graph.org/RECEIVE-BTC-07-23?hs=bd1bee0195aa89b0aefb93f6c2d7018e&:nts7dt
  • ALERT: You got 0.75 bitcoin! Go to claim → https://graph.org/RECEIVE-BTC-07-23?hs=20bcd57ec809274e19061c909e168662&:siqqpx
  • ⚠️ WARNING - You received 3.0 bitcoin! Go to claim → https://graph.org/RECEIVE-BTC-07-23?hs=d9564a149cf7ebbc725fcfce1bd3d512&:znwd1k
  • WARNING - You received 3.0 BTC! Tap to claim >> https://graph.org/RECEIVE-BTC-07-23?hs=78ee8b109ef1383fa4708aeb263ae5fb&:bwwf6q
  • Account Update - 0.8 Bitcoin pending. Complete reception => https://graph.org/ACCESS-CRYPTO-REWARDS-07-23?hs=9e710a17c6f1893b8975843ad65a53ec&:8d2k3q