jq 下拉框
<div class="alls">
<div class="item">
<div class="all">
<span class="alla">选择</span>
<span>
<div class="coinbig-c2c-sanj"></div>
</span>
</div> <div class="son">
<div class="son-input">
<img class="imgst" src="img/Group-2-copy.svg">
<input class="leftop" type="text">
</div>
<div class="son1">
<div class="as">00000000</div>
<div class="as">11111111</div>
<div class="as">22222222</div>
<div class="as">33333333</div>
<div class="as">44444444</div>
<div class="as">55555555</div>
<div class="as">66666666</div>
</div>
</div>
</div> </div>
<script>
if($('.all').length > 0) {
$('.all').on('click', function(e) {
var isShow = $(this).parents('.item').find('.son').is(':hidden');
isShow ? $(this).parents('.item').find('.son').slideDown(300) : $(this).parents('.item').find('.son').slideUp(300);
e.preventDefault();
e.stopPropagation();
});
}
if($('.as').length > 0) {
$('.as').on('click', function() {
$(this).parents('.item').find('.alla').text($(this).text());
$('.son').slideUp(300);
});
}
$(".leftop").on('click', function(e) {
e.preventDefault();
e.stopPropagation();
})
$(".imgst").on('click', function(e) {
e.preventDefault();
e.stopPropagation();
})
</script>
.all {
width: 100%;
height: 46px;
display: block;
position: relative;
color: rgba(255,255,255,1);
}
.item {
width: 100%;
height: 100%;
background: #2b4071;
line-height: 48px;
border-left: 1px solid #2a404f;
cursor: pointer;
border: 1px solid #2f4a64;
border-radius: 3px;
}
.alla {
margin-left: 10px;
font-size: 18px;
position: relative;
font-size: 14px;
}
.as {
padding-left: 10px;
font-size: 14px;
}
.as:hover {
background: #495689;
}
.son {
width: 100%;
display: none;
background-color: #15284c;
position: absolute;
top: 48px;
z-index:;
}
.item {
position: relative;
}
.coinbig-c2c-sanj {
width:;
height:;
border-width: 7px;
border-style: solid;
border-color: #ffffff transparent transparent transparent;
background: #2b4071;
position: absolute;
right: 9px;
top: 20px;
}
.zida {
font-size: 18px;
}
.sonall {
width: 100%;
top: 48px;
}
.imgst {
float: right;
width: 16px;
height: 16px;
margin-top: 12px;
margin-right: 10px;
}
.leftop {
float: left;
width: 80%;
height: 100%;
border: none;
background: #15284c;
color: #FFFFFF;
padding-left: 10px;
box-sizing: border-box;
}
.son-input {
width: 90%;
height: 40px;
border: 1px solid #495d9a;
margin: 10px auto;
}
.son1 {
overflow-y: auto;
max-height: 192px;
color: #EEEFF7;
}
.son1::-webkit-scrollbar {
width: 3px;
height: 0px;
}
.son1::-webkit-scrollbar-button {
background-color: #15284c;
}
.son1::-webkit-scrollbar-track {
background: #15284c;
}
.son1::-webkit-scrollbar-thumb {
background: #2a404f;
border-radius: 10px;
}
.son1::-webkit-scrollbar-corner {
background: #2a404f;
}
.alls {
width: 300px;
}
jq 下拉框的更多相关文章
- jq 下拉框获取选中自定义属性值
// 下拉框发送改变后 获取选择的信息 <div class="form-group"> <label class="col-sm-3 control- ...
- jq插件又来了,模拟select下拉框,支持上下方向键哦
好久没来了,更新下插件, 这个原理就是利用的 input[type='hidden']和自定义属性data-value捆绑传值操作的,可是设置默认选项,回调等参数,代码不多,比较简单,吼吼 (func ...
- jq实现简单的二级联动下拉框
1 效果图 2 html <!DOCTYPE html> <html lang="en"> <head> <meta charse ...
- jQ给下拉框绑定事件,为什么要绑定在框(select标签)上,而不是绑定在选项(option标签)上
这是我在学习锋利的 jquery 书中 5.1.4 的代码时遇到的一个小问题,源代码如下: <head> <style type="text/css"> * ...
- JQ与AJAX 省市区三级联动下拉框
用于初学者学习基本的联动下拉框,废话不多说,见代码 首先看控制器里的3个下拉框对应代码: public ActionResult GetProvinceList() { ProvinceReposit ...
- jq遍历 下拉框
var selectA1 = $("select[name=A1]"); //从A1下拉框中 搜索值 $(selectA1).children("option" ...
- jq select change下拉框选项变化判断选中值,添加(attr)或移除(removeAttr)一个或多个属性
select change下拉框选项变化判断选中值,添加(attr)或移除(removeAttr)一个或多个属性 $("#IsRecommend").change(function ...
- Jquery制作--美化下拉框
平常我们用的原生select下拉框,大部分样式没办法修改,导致在不同的浏览器里面会跟设计图的风格大相径庭.所以为了能让它美化起来,就用JQ模拟了一个下拉框,可以随意定义样式.原生的下拉框也保留在div ...
- easyui源码翻译1.32--Combo(自定义下拉框)
前言 扩展自$.fn.validatebox.defaults.使用$.fn.combo.defaults重写默认值对象.下载该插件翻译源码 自定义下拉框显示一个可编辑的文本框和下拉面板在html页面 ...
随机推荐
- LeetCode.908-最小差值 1(Smallest Range I)
这是悦乐书的第348次更新,第372篇原创 01 看题和准备 今天介绍的是LeetCode算法题中Easy级别的第213题(顺位题号是908).给定一个整数数组A,对于每个整数A[i],我们可以选择任 ...
- scikit-learn使用fetch_mldata无法下载MNIST数据集的问题
scikit-learn使用fetch_mldata无法下载MNIST数据集的问题 0. 写在前面 参考书 <Python数据科学手册> 工具 python3.5.1,Jupyter La ...
- C 语言实例 - 判断字母
C 语言实例 - 判断字母 C 语言实例 C 语言实例 用户输入一个字符,判断该字符是否为一个字母. 实例 #include <stdio.h> int main() { char c; ...
- os.walk详解
https://www.jianshu.com/p/bbad16822eab python中os.walk是一个简单易用的文件.目录遍历器,可以帮助我们高效的处理文件.目录方面的事情. 1.载入 要使 ...
- 用Java创建JMeter变量 - 终极指南
了解如何在Java中创建不同类型的JMeter变量,不同变量类型的详细信息以及如何避免错误. 在Apache JMeter™中编写负载或功能测试涉及使用不同类型的变量.变量有多种用途,例如,在以下情况 ...
- npoi导出excel合并单元格
需要引用NPOI.dll程序集和Ionic.Zip.dll程序集 string[] headerRowName = { "序号", "地市", "镇街 ...
- 啊哈算法之巧用队列解密QQ号
简述 本算法摘选自啊哈磊所著的<啊哈!算法>第二章第一节的题目——使用队列来解密举例中按照规则加密的QQ号.文中代码使用C语言编写,博主通过阅读和理解,重新由Java代码实现了一遍,意在深 ...
- window下安装php调试工具xdebug
1.https://xdebug.org/wizard.php在方框中输入本地phpinfo.php中的内容会提示对应要安装的版本, 2.https://xdebug.org/download.php ...
- angularjs e2e测试初步学习(一)
e2e测试是从用户角度出发,认为整个系统都是一个黑盒,只有UI暴露出来. angularjs的测试框架是采用protractor. 1.创建文件 首先创建一个项目文件夹test,然后再创建两个文件,一 ...
- css样式优先级问题
官方表述的CSS样式优先级如下: 通用选择器(*) < 元素(类型)选择器 < 类选择器 < 属性选择器 < 伪类 < ID 选择器 < 内联样式 那么,我们来举个 ...