`
kanpiaoxue
  • 浏览: 1745100 次
  • 性别: Icon_minigender_1
  • 来自: 北京
文章分类
社区版块
存档分类
最新评论

How to hide or show textbox and combobox

 
阅读更多

目前的easyui不支持 extbox 和 combobox 直接的隐藏,需要进行扩展。

代码如下:

$.extend($.fn.textbox.methods, {
    show: function(jq){
        return jq.each(function(){
            $(this).next().show();
        })
    },
    hide: function(jq){
        return jq.each(function(){
            $(this).next().hide();
        })
    }
});

 使用举例如下:

$('#t1').textbox('hide');  // hide the textbox
$('#c1').combobox('hide');  // hide the combobox

$('#t1').textbox('show');  // show the textbox
$('#c1').combobox('show');  // show the combobox

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics