- 浏览: 835730 次
文章分类
- 全部博客 (365)
- java (124)
- spring mvc (21)
- spring (22)
- struts2 (6)
- jquery (27)
- javascript (24)
- mybatis/ibatis (8)
- hibernate (7)
- compass (11)
- lucene (26)
- flex (0)
- actionscript (0)
- webservice (8)
- rabbitMQ/Socket (15)
- jsp/freemaker (5)
- 数据库 (27)
- 应用服务器 (21)
- Hadoop (1)
- PowerDesigner (3)
- EJB (0)
- JPA (0)
- PHP (2)
- C# (0)
- .NET (0)
- html (2)
- xml (5)
- android (7)
- flume (1)
- zookeeper (0)
- 证书加密 (2)
- maven (1)
- redis (2)
- cas (11)
最新评论
-
zuxianghuang:
通过pom上传报错 Artifact upload faile ...
nexus上传了jar包.通过maven引用当前jar,不能取得jar的依赖 -
流年末年:
百度网盘的挂了吧???
SSO单点登录系列3:cas-server端配置认证方式实践(数据源+自定义java类认证) -
953434367:
UfgovDBUtil 是什么类
Java发HTTP POST请求(内容为xml格式) -
smilease:
帮大忙了,非常感谢
freemaker自动生成源代码 -
syd505:
十分感谢作者无私的分享,仔细阅读后很多地方得以解惑。
Nginx 反向代理、负载均衡、页面缓存、URL重写及读写分离详解
html select下拉框样式在网站开发时很难控制,网上找的模仿下拉框效果代码太长而且和Jquery有这严重的冲突,于是自己写了一个ul下拉框效果,代码很短也很简单。
select.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<link href="Css/DropDownStyle.css" rel="stylesheet" type="text/css" />
<script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>
<script src="Js/DropDown.js" type="text/javascript"></script>
</head>
<body>
<ul id="uboxstyle" style=" float:left; margin-top:6px; position:relative;">
<li class="uboxstyle_Selected">查商品</li>
<li class="uboxstyle5">查商品</li>
<li class="uboxstyle5">查商家</li>
<li class="uboxstyle5">查服务</li>
<li class="uboxstyle4">查人员</li>
</ul>
</body>
</html>
DropDown.js
/// <reference path="../Scripts/jquery-1.4.1-vsdoc.js" />
//缺少鼠标离开,下拉框自动合拢写法
//搜索下列
$(function () {
li_hide();
//鼠标移到移开交替显示
$("#uboxstyle>li").first().hover(function () {
DropDownStyle($(this), "uboxstyle_Selecting");
}, function () {
DropDownStyle($(this), "uboxstyle_Selected");
});
//展开下拉控件的样式
$("#uboxstyle>li").first().click(function () {
DropDownStyle($(this), "uboxstyle_Select");
li_ctrl();
});
//在下拉控件中操作
$("#uboxstyle>li").each(function () {
if ($("#uboxstyle>li").index($(this)) > 0) {
//鼠标移动
$(this).hover(function () {
DropDownStyle($(this), "uboxstyle6");
}, function () {
DropDownStyle($(this), "uboxstyle5");
});
//鼠标点击
$(this).click(function () {
$("#uboxstyle>li:eq(0)").html($(this).html());
li_hide();
});
}
});
//为控件设置样式
function DropDownStyle($ctrl, styleName) {
$ctrl.attr("className", styleName);
}
//显示
function li_hide() {
$("#uboxstyle>li:gt(0)").hide();
}
//控制显示隐藏
function li_ctrl() {
if ($("#uboxstyle>li:eq(1)").is(":hidden")) {
li_show();
}
else {
li_hide();
DropDownStyle($("#uboxstyle>li:eq(0)"), "uboxstyle_Selecting");
}
}
//隐藏
function li_show() {
$("#uboxstyle>li:gt(0)").show();
}
});
DropDownStyle.css
body
{
padding:0px;
margin:0px;
}
/* 选项卡搜索 开始*/
#uboxstyle{width:118px; height:30px}
.uboxstyle_Selected{
display:block;
color:#447004;
width:98px;
height:30px;
padding:0px 10px;
line-height:30px;
background-color: transparent;
background-image: url(../Images/home_search1.gif);
background-repeat: no-repeat;
background-position: 0 0;
text-align:center;
line-height:30px;
cursor:hand;
}
.uboxstyle_Selecting{
display:block;
color:#447004;
width:98px;
height:30px;
padding:0px 10px;
line-height:30px;
font-size:14px;
background-color: transparent;
background-image: url(../Images/home_search1.gif);
background-repeat: no-repeat;
background-position: 0px -30px;
text-align:center;
line-height:30px;
cursor:hand;
}
.uboxstyle_Select{
display:block;
color:#447004;
width:98px;
padding:0 10px;
line-height:30px;
font-size:14px;
background-image: url(../Images/home_search1.gif);
background-repeat: no-repeat;
background-position: 0 0;
text-align:center;
line-height:30px;
}
.uboxstyle5:hover {
display:block;
width:96px;
height:30px;
padding:0 10px;
text-decoration:none;
line-height:30px;
font-size:14px;
color:#FFF;
background-color: #88C302;
text-align:center;
line-height:30px;
cursor:hand;
border-right-width: 1px;
border-left-width: 1px;
border-right-style: solid;
border-left-style: solid;
border-right-color: #d0d0d0;
border-left-color: #d0d0d0;
}
.uboxstyle4{
display:block;
width:116px;
height:30px;
text-decoration:none;
line-height:30px;
font-size:14px;
color:#447004;
background-color: #ffffff;
text-align:center;
line-height:30px;
cursor:hand;
border-right-width: 1px;
border-left-width: 1px;
border-right-style: solid;
border-left-style: solid;
border-right-color: #d0d0d0;
border-left-color: #d0d0d0;
border-bottom-width: 1px;
border-bottom-style: solid;
border-bottom-color: #d0d0d0;
}
.uboxstyle4:hover {
display:block;
width:96px;
height:30px;
padding:0 10px;
text-decoration:none;
line-height:30px;
font-size:14px;
color:#FFF;
background-color: #88C302;
text-align:center;
line-height:30px;
cursor:hand;
border-right-width: 1px;
border-left-width: 1px;
border-right-style: solid;
border-left-style: solid;
border-right-color: #d0d0d0;
border-left-color: #d0d0d0;
}
.uboxstyle5{
display:block;
width:96px;
height:30px;
padding:0 10px;
text-decoration:none;
line-height:30px;
font-size:14px;
color:#447004;
background-color: #ffffff;
text-align:center;
line-height:30px;
cursor:hand;
border-right-width: 1px;
border-left-width: 1px;
border-right-style: solid;
border-left-style: solid;
border-right-color: #d0d0d0;
border-left-color: #d0d0d0;
}
.uboxstyle6{
color:#ffffff;
background-color: transparent;
background-image: url(../Images/home_search1.gif);
background-repeat: no-repeat;
background-position: 0px -90px;
width:118px;
height:30px;
text-align:center;
line-height:32px;
cursor:hand;
}
.uboxstyle7{
background-image: url(../Images/home_search1.gif);
background-repeat: no-repeat;
background-position: 0px -120px;
color:#fff
}
/* 选项卡搜索 结束*/
- _www_pin5i_com_JQuery_select.rar (23.1 KB)
- 下载次数: 4
- jquery.zip (34.4 KB)
- 下载次数: 4
- selectInputBox.rar (64.2 KB)
- 下载次数: 4
发表评论
-
jQuery自动加载更多程序
2015-03-12 13:16 3871.1.1 摘要 现在,我们经常使用的 ... -
给jQuery Validate添加一个好看点的提示框。
2014-10-15 10:48 675弄个箭头是不 ... -
轻量级图形报表工具JSCharts (JSChart),内置函数中文参考
2014-08-26 15:26 966轻量级图形报表工具JSCharts (JSChart),内置 ... -
基于1.3.3版本tooltip的datagrid单元格tip实现
2014-07-23 09:00 688文章目录 [隐藏] 1实现代 ... -
jQuery easyUI动态获取表结构并显示表中的数据)
2014-07-23 08:36 7594问题描述一: 首先根据输入的sql语句获得相关的列 ... -
jQuery plugin: Autocomplete 参数及实例
2014-07-18 10:34 582此插件依赖于 jquery 1.2.6 --- jqu ... -
kindeditor4.0.6的使用方法(jsp+struts2)
2014-07-17 08:58 744最近在研究kindeditor4.0.6在struts框架下 ... -
jQuery分别获取选中的复选框值
2014-04-01 13:12 815function jqchk(){ //j ... -
基于jquery获取光标所在位置
2012-12-20 13:32 11607// //使用方法 //$(文本域选择器).insertCon ... -
jquery easyui 组合校验的方法
2012-12-04 14:00 1272先前的jquery easyui 不支持组合校验,我改了一下源 ... -
一键下载75款常用的jquery特效前端网页代码+表格验证框架
2012-11-02 18:08 971一键下载75款常用的jquery特效前端网页代码+表格验证框架 ... -
jquery.validate 扩展验证+异步验证
2012-10-25 15:05 1390validate_expand.js ... -
jquery获取url及起参数列表
2012-10-19 20:02 921在基于B/S的web开发中,我们时常会通过发请求给 ... -
兼容IE,firefox,chrome,safari预加载图片height和width获取
2012-09-21 23:51 1592在web开发中我们有时需要通过js去预加载图片,按 ... -
个人呕心沥血之作-----js大脑图beta01版正式发布
2012-09-20 22:26 818本博客只开博以来一直是分类的方式去给大 ... -
电子商务图片放大jqzoom
2012-09-16 10:53 3979http://www.mind-projects.it/ 官网 ... -
JQuery动态行列table
2012-09-10 13:38 1066项目使用JQuery,有个数据回显页面,客户要求提供一个下 ... -
jQuery中10个非常有用的遍历函数
2012-09-09 08:11 740使用jQuery,可以 很容易的选择HTML元素。但有些时候, ... -
轻松使用jquery解析XML
2012-09-09 08:12 897xml文件结构:books.xml <?xml vers ... -
JSON-lib框架,转换JSON、XML不再困难
2012-09-09 08:12 935Json-lib可以将Java对象转成json格式的字符串 ...
相关推荐
JQuery结合UL标签下拉框美化是一款没有使用到select标签,由ul标签和input标签组合,点击下拉项后能获取到值。
JQuery结合UL标签下拉框美化是一款没有使用到select标签,由ul标签和input标签组合,点击下拉项后能获取到值。
jquery+css实现的ul+li模仿下拉框表单美化效果源码.zip
好看的select下拉框(带搜索功能),由于默认select样式过丑而且有些东西还不好改,这个是利用input框和ul来实现一个下拉框的效果。分为不带搜索功能和带搜索功能两个部分。以及jquery与javascript两种实现
先给大家展示下效果图,喜欢的朋友可以下载源码哦 效果演示 源码下载 手册网 <ul class=dropdown xss=removed> <li><a>jQuery特效</a></li> <li><a>网站模板</a></li> </ul> </section>
先给大家展示下效果图: 除了jquery,需要引用的样式和js文件: <link rel="stylesheet" type="text/css" href="../assets/jquery.multiselect.css" /> <link rel="stylesheet" type="text/css" href="....
非常实用的jQuery模拟selected选择下拉框美化特效,对于传统的IE下的下拉框大家可能都觉得 跟现在的页面都格格不入,大家都想美化下,今天推荐的这个JS特效是利用jQuery以及UL改造的 select下拉选择美化特效还是很...
jquery模拟SELECT框,效果图如下: 代码如下: <!DOCTYPE html> <html lang=”en”> <head> <title>jquery模拟SELECT框</title> <meta charset=”utf-8″> <style> body{...
本文实例为大家分享了jquery.multiselect多选下拉框的实现方法,供大家参考,具体内容如下 第一步:链接下列文件,如果没有,到此网页下载 https://github.com/ehynds/jquery-ui-multiselect-widget,此插件基于...
原理就是一个textbox加一个ul模拟下拉框,用font模拟一个下拉按钮。 一、制作静态效果 先用css和html,做出一个应该有的样子。这里这两个我使用的是字体,可以在icomoon网站上面自己制作。用字体的好处是和输入框...
$(“#id”).multiSelect({ oneOrMoreSelected: ‘*’,selectAll:false,noneSelected:’默认显示’ }); Usage: $(‘#id’).multiSelect( options, callback ) Options: selectAll – whether or not to display the ...
两种都可以,不过新版jquery推荐第二种,两个在其他方面都差不多,我发现的唯一不同就是在checkbox上的时候,需要用prop,不然IE浏览器会不兼容 代码如下:<html xmlns=”http://www.w3.org/1999/xhtml”> <...
推荐jQuery美化select下拉框样式漂亮效果 27.下载jQuery网页表单美化修饰插件(jQtransForm美化表单) 28.一款jquery实现表单输入提示的Autobox插件(基于jquery.ui) 29.一款美化表单下拉列表、复选框等的jquery ...
非常漂亮的JQuery+ul模拟select下拉框插件
今天我们要来分享一款很实用的jQuery插件,它是一个基于jQuery多级联动的省市地区Select下拉框,并且值得一提的是,这款联动下拉框是经过自定义美化过的,外观比浏览器自带的要漂亮许多。另外,这个Select下拉框也...
web页面中,我们一般不用select、option来实现下拉菜单效果,因为下拉框的样式丑且难以美化,所以我们选择控制ul显示隐藏来实现同样且高大上的效果,但是不能像下拉框那样点击页面其他部分,下拉菜单收起或隐藏,...
用div+ul模拟出来了select然后用jquery+jquery.easyui.min+json生成下拉树
上面的人要hui admin 做页面,本人前端比较菜,这框架也没用...①:请求数据+ul拼接 比较糙,两边icon 无力回天,不过功能是实现了 $.ajax({ url:'/type/reportType', data:{token:getCookie(token)}, type:'post',