show/hide
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="resource/bootstrap/css/bootstrap.css"/>
<script src="resource/jQuery/jquery-1.11.3.js"></script>
<script src="resource/bootstrap/js/bootstrap.js"></script>
<script>
$().ready(function(){
$("#hide").click(function(){
$("p").hide();
})
$("#show").click(function(){
$("p").show();
})
})
$().ready(function(){
$("#hide1").click(function(){
$("p").hide();
})
$("#show1").click(function(){
$("p").show();
})
})
$().ready(function(){
$("#hide2").click(function(){
$("p").hide();
})
$("#show2").click(function(){
$("p").show();
}) })
$().ready(function(){
$("#show3").click(function(){
$("p").show();
})
$("#hide3").click(function(){
$("p").hide();
})
}) </script>
</head>
<body>
<p>if you click the button named hide, i will disappear</p>
<button id="hide">hide</button>
<button id="show">show</button>
<button id="hide1">hide1</button>
<button id="show1">show1</button>
<button id="hide2">hide2</button>
<button id="show2">show2</button>
<button id="show3">show3</button>
<button id="hide3">hide3</button>
</body>
</html>
show/hide的更多相关文章
- View and Data API Tips: Hide elements in viewer completely
By Daniel Du With View and Data API, you can hide some elements in viewer by calling "viewer.hi ...
- jquery的show/hide/toggle详解
通过阅读源码我们发现show,hide,toggle调用了showHide和isHidden这2个方法,所以我们要搞明白原理必须先看一下这2个方法. jQuery.fn.extend({ ...... ...
- Jquery:hide一个元素,需要注意的问题(offset)
$(".load_more").css('display','none'); 或 $(that.more).find("strong").hide(); 需要注 ...
- jquery的hide()和show()
jquery用hide()和show()函数来控制html元素的显示和隐藏. hide()和show()都可以带参数的,hide(1000)表示隐藏所需的时间为1秒.此外还可以用slow,fast参数 ...
- JS——树形导航菜单(html的ul嵌套,jQuery的css(),show(),hide(),index()等方法)
必备工具:jquery库文件.我这里用的是1.4版本的. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN&q ...
- [转]Hide or Remove jquery ui tab based on condition
本文转自:http://stackoverflow.com/questions/19132970/hide-or-remove-jquery-ui-tab-based-on-condition 问: ...
- 犀牛书的实例代码:给对象添加freeze, hide, 查询descriptors
/* * Define a properties() method in Object.prototype that returns an * object representing the name ...
- 【BZOJ-1941】Hide and Seek KD-Tree
1941: [Sdoi2010]Hide and Seek Time Limit: 16 Sec Memory Limit: 162 MBSubmit: 830 Solved: 455[Submi ...
- jQuery hide()并不等于hide(0)
在实际使用中,经常用hide()函数来隐藏HTML元素,通常是没有什么问题的,但在一次做二级下拉菜单时遇到了问题,后来才发现有时候“speed”是不能省略的,即使“speed=0”,也就是说hide( ...
- IE6低版本jQuery里的show和hide方法BUG
公司内部一直在用的jQ的版本有些低,具体是哪个版本不太清楚,相关的东西都给删掉了,今天在做一个固定在页面右侧的导航的时候,IE6里出现了一个比较奇葩的问题.具体样子如下图: 收起是用定位left等于负 ...
随机推荐
- JS escape、encodeURI 、encodeURIComponent 编码与解码[转]
转至:http://jc-dreaming.iteye.com/blog/1702407 本文讨论如何对传递参数用JS编码与解码 1:编码与解码方法的对应关系 escape ------------- ...
- Web开源框架大汇总
Struts 项目简介信息 Struts是一个基于Sun J2EE平台的MVC框架,主要是采用Servlet和JSP技术来实现的.由于Struts能充分满足应用开发的需求,简单易用,敏捷迅速,在过去的 ...
- MFC 视图、文档、框架(通讯)
CMainFrame * pMainWnd=(CMainFrame*)AfxGetApp()->m_pMainWnd;//主框架 CChildFrame * pChild = (CChildFr ...
- 剑指OFFER之变态跳台阶(九度OJ1389)
题目描述: 一只青蛙一次可以跳上1级台阶,也可以跳上2级……它也可以跳上n级.求该青蛙跳上一个n级的台阶总共有多少种跳法. 输入: 输入可能包含多个测试样例,对于每个测试案例, 输入包括一个整数n(1 ...
- opennebula虚拟机启动失败
问题1 故障现象: Wed Jan :: [DiM][I]: New VM state is ACTIVE. Wed Jan :: [LCM][I]: New VM state is PROLOG. ...
- iOS 推送证书
push 服务器证书 钥匙串:登入-->证书,选项里面导出证书命名为cert.p12,跟密钥命名为key.p12 需要将上面的2个.p12文件转成.pem格式: openssl pkcs12 - ...
- cocos2d-x 手电筒效果
转自:http://blog.csdn.net/xujiezhige/article/details/8448524# 常见的手电筒效果,可以通过CCRenderTexture来实现.主要是通过修改渲 ...
- java虚拟机JVM学习笔记-基础知识
最近使用开发的过程中出现了一个小问题,顺便记录一下原因和方法--java虚拟机 媒介:JVM是每一位从事Java开发工程师必须翻越的一座大山! JVM(Java Virtual Machine)JRE ...
- STM8的wait for interrupt
如果我用disable interrupt和enable interrupt包裹wait forinterrupt(WFI).你说WFI还能被唤醒么?有思考过么? 昨晚拿STM8L151K4的开发板, ...
- C++ Button右键弹出式菜单
Button右键弹出式菜单 关键点 用类来实现 的 实现过程 新建1个类 类名CButtonPopMenu 基类CButton 新建1个菜单资源 IDR_MENU1 // ButtonPopMenu ...