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

  1. jq 下拉框获取选中自定义属性值

    // 下拉框发送改变后 获取选择的信息 <div class="form-group"> <label class="col-sm-3 control- ...

  2. jq插件又来了,模拟select下拉框,支持上下方向键哦

    好久没来了,更新下插件, 这个原理就是利用的 input[type='hidden']和自定义属性data-value捆绑传值操作的,可是设置默认选项,回调等参数,代码不多,比较简单,吼吼 (func ...

  3. jq实现简单的二级联动下拉框

    1 效果图 2 html <!DOCTYPE html> <html lang="en"> <head>     <meta charse ...

  4. jQ给下拉框绑定事件,为什么要绑定在框(select标签)上,而不是绑定在选项(option标签)上

    这是我在学习锋利的 jquery 书中 5.1.4 的代码时遇到的一个小问题,源代码如下: <head> <style type="text/css"> * ...

  5. JQ与AJAX 省市区三级联动下拉框

    用于初学者学习基本的联动下拉框,废话不多说,见代码 首先看控制器里的3个下拉框对应代码: public ActionResult GetProvinceList() { ProvinceReposit ...

  6. jq遍历 下拉框

    var selectA1 = $("select[name=A1]"); //从A1下拉框中 搜索值 $(selectA1).children("option" ...

  7. jq select change下拉框选项变化判断选中值,添加(attr)或移除(removeAttr)一个或多个属性

    select change下拉框选项变化判断选中值,添加(attr)或移除(removeAttr)一个或多个属性 $("#IsRecommend").change(function ...

  8. Jquery制作--美化下拉框

    平常我们用的原生select下拉框,大部分样式没办法修改,导致在不同的浏览器里面会跟设计图的风格大相径庭.所以为了能让它美化起来,就用JQ模拟了一个下拉框,可以随意定义样式.原生的下拉框也保留在div ...

  9. easyui源码翻译1.32--Combo(自定义下拉框)

    前言 扩展自$.fn.validatebox.defaults.使用$.fn.combo.defaults重写默认值对象.下载该插件翻译源码 自定义下拉框显示一个可编辑的文本框和下拉面板在html页面 ...

随机推荐

  1. NOIp知识集合 By cellur925

    基本算法 快速幂 ll ksm(ll a,ll b) { ll ans=; while(b) { ) ans=ans*a%p; b>>=; a=a*a%p; } return ans; } ...

  2. jconsole 本地连接失败

    http://limaoyuan.iteye.com/blog/1541745 加jvm 启动参数即可: -Dcom.sun.management.jmxremote  -Dcom.sun.manag ...

  3. 深入浅出面向对象分析与设计读书笔记一&吉他搜索案例&吉他特性锚点集中&委托&重用&业务阶段&需求列表&用例

    案例:吉他搜索Guitar Inventory GuitarSpec需求变化:增加吉他弦数特性原始程序需要的变化: 1.修改GuitarSpec,构造,成员,getter 2.修改Guitar,构造, ...

  4. js 阻止元素发生默认的行为ie兼容

    //亲测ie9可以兼容 function Go(event) { var e = event; if (e && e.preventDefault) { e.preventDefaul ...

  5. 查询索引range失效

    在某一个时间字段加索引,短的时间范围内查询,索引生效,为range.长时间范围,索引失效,查全表. 当索引查的数据量超过全表30%的数据,索引失效,会查全表.

  6. idea 卡顿问题

    转载大神总结 https://jingyan.baidu.com/article/c275f6ba14207ee33c756752.html

  7. JavaSE---悲观锁与乐观锁

    1.[悲观锁] 1.1 在数据处理的整个过程中,数据将处于锁定状态: 1.2 悲观锁的实现,依赖于数据库提供的锁机制(只有数据库提供的锁机制才能真正保证数据访问的排他性,否则,即使在系统中加锁机制,也 ...

  8. Mybatis find_in_set 子查询,替代 in

    1. Mapper文件 2.dao层 3.生成Sql

  9. Python+Selenium与Chrome如何进行完美结合

    zhuan:http://blog.51cto.com/starpoint/2102975?cid=704621 使用WebDriver在Chrome浏览器上进行测试时,需要从http://chrom ...

  10. UI设计中蕴涵着系统重要的数据结构与功能设计

    UI设计中蕴涵着系统重要的数据结构与功能设计 UI设计中的用户需求,事件(用例)驱动