combobox的下拉框高度怎样设计合理
orry,代码如下
$.extend($.fn.combobox.methods, {
autoHeight : function (jq) {//combobox扩展,自动调整高度
var $this = jq;
var $panel = $this.data("combo").panel;
var panelHeight = $this.data("combo").options.panelHeight;
$panel.height("inherit");
if ($panel.outerHeight() >= panelHeight) {
$panel.outerHeight(panelHeight);
}
}
});
说明:
在onShowPanel里调用即可。实际高度超出了panelHeight,则已panelHeight为准,否则已实际高度为准
http://bbs.jeasyuicn.com/forum.php?mod=viewthread&tid=5486&extra=page%3D4