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的更多相关文章

  1. checkbox美化;给div加上checked属性

    DIV的背景图修改 $("#isOpenmibao").css("backgroundImage", " url('../images/checkbo ...

  2. 实现点击后创建div,若对div2秒无操作则将div隐藏,鼠标移上div让它不隐藏,移出div超过两秒则div隐藏

    $('.addLabel').on('click', function () { setTimeout(function(){ if(hoverflag==0){ $(".labelHide ...

  3. 计算Div标签内Checkbox个数或已被disabled的个数

    先看下面的html: 计算div内的checkbox个数:$('#divmod input[type="checkbox"]').length 计算div内checkbox被dis ...

  4. 实现CheckBox的三种选中状态(全选、半选、不选)在GridView中模拟树形的功能

    度娘了很多帖子,只说三种状态要用图片替换来做,但没找到有用的例子,被逼自己写了一个 三方控件肯定是很多的,如jstree,可以直接用 由于公司的UDS限制,不能上传图片,只能文字说明了. 就是要在gr ...

  5. checkbox探究

    介绍checkbox checkbox: A check box. You must use the value attribute to define the value submitted by ...

  6. 用css改变默认的checkbox样式

    自己常用的改变checkbox样式的两个方法: 一.利用background用图片代替checkbox效果 缺点:你首先得有一张好看的图片 优点:浏览器兼容性好 <!doctype html&g ...

  7. CSS3和jQuery实现的自定义美化Checkbox

    效果图: 是不是比默认的好看多了,个人的审美观应该还是可以的. 当然我们可以在这里查看DEMO演示. 接下来我们一起来看看实现这款美化版Checkbox的源代码.主要思路是利用隐藏原来的checkbo ...

  8. TreeView checkbox 全选

    在使用TreeView 控件 ,进行权限管理的时候,需要使用 checkbox全选. 勾选父节点,子节点全部选中.取消父节点,子节点不选中. 勾选子节点,父节点也选中. 以下是在使用的例子: < ...

  9. checkbox实现全选全不选

    1.jQuery实现checkbox全选全不选 <!DOCTYPE html> <head runat="server"> <title>jQu ...

随机推荐

  1. Dynamics AX 2012 R2 AIF No Endpoint Behavior Named 'clientEndpointBehavior'

          最近,Reinhard在使用Http Adapter类型的AIF入站端口时,总是报以下错误: Server Error in '/MicrosoftDynamicsAXAif60' App ...

  2. MySql binlog恢复数据

    1. 直接导入数据库 mysqlbinlog --database=testdb mysql-bin. | mysql -uroot -f 2. 导出成SQL文 (1) 从binlog输出为SQL m ...

  3. (转载)The One Sign You Will Be Rich-(by Brian de Haaff Founder and CEO Aha! -- world's #1 product roadmap software)

    When I was studying Philosophy at Berkeley, a friend told me that she could tell who was going to be ...

  4. spark使用02

    1.rdd的初始化 1.1 读取文件来初始化rdd(通过sparkContext的textFile方法) 1.1.1 读取本地文件 SparkConf conf = new SparkConf().s ...

  5. sql-按周输出每月的周日期范围

    --日期参数,此处可以建立存储过程,接收月份,计算月开始结束时间或者直接接受开始与结束时间 declare @begDate datetime = '2014-06-01' declare @endD ...

  6. Boost学习笔记(二) 时间与日期

    timer库概述 timer库包含三个组件:分别是计时器类timer.progress_timer和进度指示类progress_display timer 主要作用是计时,精确度是毫秒级.下面是一个简 ...

  7. Query Designer:Exception,不同的值显示不同的颜色

    声明:原创作品,转载时请注明文章来自SAP师太技术博客( 博/客/园www.cnblogs.com):www.cnblogs.com/jiangzhengjun,并以超链接形式标明文章原始出处,否则将 ...

  8. PHP中的逻辑运算符的优先级

    在三元运算中(expr1)?(expr2):(expr3); and,or,xor的优先级要小于三元运算符,所以需要添加括号例:如果$a为true,$b为fals,$a and $b?"tr ...

  9. 如何实现修改FileUpload样式

    这里先隐藏FileUpload 然后用一个input button和一个text来模拟FileUpload 具体代码为 <asp:FileUpload ID="FileUpload1& ...

  10. VR外包 虚拟现实外包 北京软件公司

    我们制作各类型VR全景虚拟现实,增强现实视频制作.录制等项目.品质保证,售后完备,可签合同.contectus: 13911652504(技术经理tommy) 承揽VR外包 虚拟现实外包 U3D外包( ...