droplist
来源:互联网 发布:网络票务系统 编辑:程序博客网 时间:2024/05/20 11:50
var self = this;
var curSelected=null;
var $container=null;
var $dom=null;
this.$inputbox=null;
var $trigger=null;
var $list=null;
var $listInner=null;
var items=[];
this.isSingle = settings.isSingle;
this.value = [];
this.ids = [];
var validateParamType = function(obj){
if(!obj) return;
if(typeof obj=="string"&&obj.indexOf("#")==-1&&obj.indexOf(".")==-1&&obj.indexOf(":")==-1&&$(obj).length == 0){
obj = $("#"+obj);
} else {
obj = $(obj);
}
return obj;
}
$container = this.$container = validateParamType(settings.container);
//输入框和下拉按钮
var itemSelecting=false;//是否正在做选择,当鼠标经过弹出菜单时如此。
//设置下拉列表的位置
function setListPosition(){
if($list.offsetParent().is(":not(body)")){
$list.css("left",$dom.position().left).css("top",$dom.position().top+$dom.outerHeight()+"px");
} else {
$list.css("left",$dom.offset().left).css("top",$dom.offset().top+$dom.outerHeight()+"px");
}
}
//位置调整,使用up down键时,被选中的item不会被遮挡
function adjustListposition(obj){
if(obj.length==0) return;
var prevsTotalHeight = 0;//.over之前所有item总高度
var listHeight = $list.height();//list可见高度
var objHeight = obj.outerHeight(true);
$.each(obj.prevAll(),function(){
prevsTotalHeight += $(this).outerHeight(true);
});
if(obj.position().top<0){
$list.scrollTop(prevsTotalHeight);
}
if(obj.position().top+objHeight>listHeight){
$list.scrollTop(prevsTotalHeight+objHeight-listHeight);
}
}
var curSelected=null;
var $container=null;
var $dom=null;
this.$inputbox=null;
var $trigger=null;
var $list=null;
var $listInner=null;
var items=[];
this.isSingle = settings.isSingle;
this.value = [];
this.ids = [];
var validateParamType = function(obj){
if(!obj) return;
if(typeof obj=="string"&&obj.indexOf("#")==-1&&obj.indexOf(".")==-1&&obj.indexOf(":")==-1&&$(obj).length == 0){
obj = $("#"+obj);
} else {
obj = $(obj);
}
return obj;
}
$container = this.$container = validateParamType(settings.container);
//输入框和下拉按钮
var itemSelecting=false;//是否正在做选择,当鼠标经过弹出菜单时如此。
//设置下拉列表的位置
function setListPosition(){
if($list.offsetParent().is(":not(body)")){
$list.css("left",$dom.position().left).css("top",$dom.position().top+$dom.outerHeight()+"px");
} else {
$list.css("left",$dom.offset().left).css("top",$dom.offset().top+$dom.outerHeight()+"px");
}
}
//位置调整,使用up down键时,被选中的item不会被遮挡
function adjustListposition(obj){
if(obj.length==0) return;
var prevsTotalHeight = 0;//.over之前所有item总高度
var listHeight = $list.height();//list可见高度
var objHeight = obj.outerHeight(true);
$.each(obj.prevAll(),function(){
prevsTotalHeight += $(this).outerHeight(true);
});
if(obj.position().top<0){
$list.scrollTop(prevsTotalHeight);
}
if(obj.position().top+objHeight>listHeight){
$list.scrollTop(prevsTotalHeight+objHeight-listHeight);
}
}
- droplist
- droplist
- droplist
- droplist
- droplist
- droplist
- droplist
- droplist
- droplist绑定数组
- droplist应用实例
- droplist应用实例
- gridview 与droplist结合
- droplist /RadioButtonList 默认选中
- droplist绑定与显示
- droplist绑定与显示
- ActionBar之droplist的使用
- javascript获得服务器断droplist的值
- 将DropList以树形的方式显示
- 原生Android4.0来电按钮消失的问题
- 数据库和表的建立(答案是丰富多彩滴)
- 蒙特卡罗算法--主元素问题
- 毕业这段时间……
- droplist
- droplist
- droplist
- droplist
- Android调用系统照相机拍照并自定义名称存储
- droplist
- droplist
- 十一、java面向对象编程(类、对象)
- droptlist
- 2012-06-30