checkbox点击后出现div
HTML:
<div class="msg_editUrl_function">
<label class="labelChecked" for="url_checkbox">
<input type="checkbox" class="url_checkbox" name="source_url_checked" id="url_checkbox">
<span class="lbl_content"> 原文链接</span>
</label>
<div class="url_input_div" >
<input type="text" class="url_input" name="source_url">
</div>
</div>
CSS:
.msg_editUrl_function {
padding-top: 20px;
margin: 0 90px 10px 0;
border-bottom: 1px solid #e7e7eb;
}
.labelChecked {
position: relative;
width: 90px;
height: 30px;
display: block;
}
.url_checkbox {
box-sizing: border-box;
padding: 0;
width: 18px;
height: 18px;
position: absolute;
}
.lbl_content {
display: inline-block;
position: absolute;
width: 60px;
height: 20px;
left: 30px;
bottom: 10px;
}
.url_input {
background-color: transparent;
border: 0;
outline: 0;
width: 100%;
height: 100%;
}
.url_input_div {
margin-left: 1.7em;
width: 508px;
position: relative;
height: 30px;
line-height: 30px;
vertical-align: middle;
font-size: 14px;
padding: 0 10px;
border: 1px solid #e7e7eb;
box-shadow: none;
-webkit-box-shadow: none;
-moz-border-radius: 0;
-webkit-border-radius: 0;
background-color: #fff;
margin-bottom: 20px;
display:none;
}
JS:
$(".url_checkbox").change(function(){
if($(".url_checkbox").prop("checked")){
$(".url_input_div").css("display","block");
}else{
$(".url_input_div").css("display","none");
}
})
checkbox点击后出现div的更多相关文章
- checkbox美化;给div加上checked属性
DIV的背景图修改 $("#isOpenmibao").css("backgroundImage", " url('../images/checkbo ...
- 实现点击后创建div,若对div2秒无操作则将div隐藏,鼠标移上div让它不隐藏,移出div超过两秒则div隐藏
$('.addLabel').on('click', function () { setTimeout(function(){ if(hoverflag==0){ $(".labelHide ...
- 计算Div标签内Checkbox个数或已被disabled的个数
先看下面的html: 计算div内的checkbox个数:$('#divmod input[type="checkbox"]').length 计算div内checkbox被dis ...
- 实现CheckBox的三种选中状态(全选、半选、不选)在GridView中模拟树形的功能
度娘了很多帖子,只说三种状态要用图片替换来做,但没找到有用的例子,被逼自己写了一个 三方控件肯定是很多的,如jstree,可以直接用 由于公司的UDS限制,不能上传图片,只能文字说明了. 就是要在gr ...
- checkbox探究
介绍checkbox checkbox: A check box. You must use the value attribute to define the value submitted by ...
- 用css改变默认的checkbox样式
自己常用的改变checkbox样式的两个方法: 一.利用background用图片代替checkbox效果 缺点:你首先得有一张好看的图片 优点:浏览器兼容性好 <!doctype html&g ...
- CSS3和jQuery实现的自定义美化Checkbox
效果图: 是不是比默认的好看多了,个人的审美观应该还是可以的. 当然我们可以在这里查看DEMO演示. 接下来我们一起来看看实现这款美化版Checkbox的源代码.主要思路是利用隐藏原来的checkbo ...
- TreeView checkbox 全选
在使用TreeView 控件 ,进行权限管理的时候,需要使用 checkbox全选. 勾选父节点,子节点全部选中.取消父节点,子节点不选中. 勾选子节点,父节点也选中. 以下是在使用的例子: < ...
- checkbox实现全选全不选
1.jQuery实现checkbox全选全不选 <!DOCTYPE html> <head runat="server"> <title>jQu ...
随机推荐
- nodejs的初学
1.启服务器.先server.js,再命令行输入命令node server.js,打开浏览器输入http://127.0.0.1:2016可以看到有内容输出. server.js代码如下: var h ...
- CSS3 笔记四(Transforms/Transition/Animations)
CSS3 2D Transforms Methods translate() rotate() scale() skewX() skewY() matrix() 1> translate() T ...
- win7 ins 30131 oracle 12c
Cause - Failed to access the temporary location. Action - Ensure that the current user has required ...
- angular-笔记
ng-model 指令ng-model 指令 绑定 HTML 元素 到应用程序数据.ng-model 指令也可以:为应用程序数据提供类型验证(number.email.required).为应用程序数 ...
- CountDownLatch和CyclicBarrier 举例详解
有时候会有这样的需求,多个线程同时工作,然后其中几个可以随意并发执行,但有一个线程需要等其他线程工作结束后,才能开始.举个例子,开启多个线程分块下载一个大文件,每个线程只下载固定的一截,最后由另外一个 ...
- Android 逐帧动画
原理: 逐帧动画是最简单的一种动画.原理就是把几张图片连续显示出来,以达到动画的效果.就相当于下面这种手绘翻页动画啦~ 实现: 1.需要建立一个animation-list来设置静态图片资源.持续时间 ...
- springmvc使用freemarker
首先需要添加freemarker.jar到项目,如果项目中有spring或者spirngmvc,需要整合,首先配置freemarkerConfig,代码结构如下 <!-- 设置freeMarke ...
- 【Qt学习笔记】窗口部件整理
关于Qt中窗口部件的学习 今天开始学习Qt的窗口部件,领略一下Qt的神奇之处,记得2012年的那年冬天,我还学Java呢,现在基本上和Java说再见了,不过对于嵌入式的开发Qt还是举足轻重的,我想趁着 ...
- [转]让窗体不显示在Alt+Tab中
public class MyForm : Form { protected override CreateParams CreateParams { get { const int WS_EX_AP ...
- RStudio中,出现中文乱码问题的解决方案
RStudio中,出现中文乱码问题的解决方案解决步骤:1.设置RStudio文本显示的默认编码:RStudio菜单栏的Tools -> Global Options2.选择General -&g ...