请问一个关于下拉列表复选框可以左右移动,并实现选项增减的插件问题 控件左右移动,增减 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 http://www.helloweba.com/demo/select2select/http://js.alixixi.com/a/2016387963251.shtmlhttp://www.17sucai.com/pins/demoshow/5202 div模拟select好对齐,不过select的shit和ctrl键选择有点麻烦,有需要你自己添加了~~<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.4.2.min.js"></script><style>a{text-decoration:none}.select{overflow:auto;width:100px;height:120px;float:left;border:solid 1px #ccc;line-height:20px; -moz-user-select: none;-webkit-user-select: none;-ms-user-select: none;-khtml-user-select: none; user-select: none;}.select div.focus{color:#fff;background:#0a246a}.select div.focus a{color:#fff}.good{width:200px}.good input{border:solid 1px #ccc;width:30px;text-align:center}.good a{margin:0px 5px}</style><script> function bindEvent(items) { return items.click(function () { $(this).toggleClass('focus'); }); } $(function () { bindEvent($('div.select >div')); $('div.select').bind('selectstart', function () { return false }); }); function spin(e) { var minus = this.innerHTML == '-', txt = $(this)[minus ? 'next' : 'prev'](), v = parseInt(txt.val(), 10) || 0; v += minus ? -1 : 1; if (v < 0) v = 0; txt.val(v); e.stopPropagation(); return false; } function move(remove) { var l = $('#dvLeft'), r = $('#dvRight'), items = (remove ? r : l).find('div.focus'); if (items.size() == 0) { alert('请选择货物!'); return; } if (remove) items.find('a').unbind('click').end().unbind('click').remove(); else bindEvent(items.removeClass('focus').clone().append('<a href="#">-</a><input type="text" value="0"/><a href="#">+</a>').appendTo(r)).find('a').click(spin); }</script><div class="select" id="dvLeft"><div>A货物</div><div>B货物</div><div>C货物</div><div>D货物</div><div>E货物</div></div><div style="float:left;width:50px;text-align:center;padding-top:40px"><a href="javascript:move()">=>></a><br /><a href="javascript:move(true)"><<=</a></div><div class="select good" id="dvRight"></div> 大侠,太强了我仔细研究了一下,可以实现再提一哈,可不可以用ComboBox,里面用template模板这种形式实现呢???或者其他控件类似模板的方法实现?? Ext还easyui,这2个应该可以实现,需要自己写代码,逻辑和示例差不多,要给对象绑定事件 关于Ext中的一个ui问题。 有没有什么办法保存网上的那种整套幻灯片? 求解 js float运算出错 js 取file对象的value问题 正则表达式,请帮忙修改一下 鼠标划过时表格里的内容被切换的问题(急!急!急!) jquery 文本框值问题 请问大家有没有做过甘特图?能不能给小弟一点提示。 关于一个联动下拉框的问题,解决马上给分. JQ中如何获取子元素中的内容 EasyUI dataGrid 加载数据过慢 jq的uploadify上传插件参数传递问题
http://js.alixixi.com/a/2016387963251.shtml
http://www.17sucai.com/pins/demoshow/5202
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.4.2.min.js"></script>
<style>
a{text-decoration:none}
.select{overflow:auto;width:100px;height:120px;float:left;border:solid 1px #ccc;line-height:20px; -moz-user-select: none;-webkit-user-select: none;-ms-user-select: none;-khtml-user-select: none; user-select: none;}
.select div.focus{color:#fff;background:#0a246a}
.select div.focus a{color:#fff}
.good{width:200px}
.good input{border:solid 1px #ccc;width:30px;text-align:center}
.good a{margin:0px 5px}
</style>
<script>
function bindEvent(items) { return items.click(function () { $(this).toggleClass('focus'); }); }
$(function () { bindEvent($('div.select >div')); $('div.select').bind('selectstart', function () { return false }); });
function spin(e) {
var minus = this.innerHTML == '-', txt = $(this)[minus ? 'next' : 'prev'](), v = parseInt(txt.val(), 10) || 0;
v += minus ? -1 : 1;
if (v < 0) v = 0;
txt.val(v);
e.stopPropagation();
return false;
}
function move(remove) {
var l = $('#dvLeft'), r = $('#dvRight'), items = (remove ? r : l).find('div.focus');
if (items.size() == 0) { alert('请选择货物!'); return; }
if (remove) items.find('a').unbind('click').end().unbind('click').remove();
else bindEvent(items.removeClass('focus').clone().append('<a href="#">-</a><input type="text" value="0"/><a href="#">+</a>').appendTo(r)).find('a').click(spin);
}
</script>
<div class="select" id="dvLeft">
<div>A货物</div>
<div>B货物</div>
<div>C货物</div>
<div>D货物</div>
<div>E货物</div>
</div>
<div style="float:left;width:50px;text-align:center;padding-top:40px"><a href="javascript:move()">=>></a><br /><a href="javascript:move(true)"><<=</a></div>
<div class="select good" id="dvRight"></div>
大侠,太强了我仔细研究了一下,可以实现
再提一哈,可不可以用ComboBox,里面用template模板这种形式实现呢???或者其他控件类似模板的方法实现??