zoukankan      html  css  js  c++  java
  • easyui layout 左右面板折叠后 显示标题

    (function($){
     var buttonDir = {north:'down',south:'up',east:'left',west:'right'};
        $.extend($.fn.layout.paneldefaults,{
            onBeforeCollapse:function(){
                var popts = $(this).panel('options');
                var dir = popts.region;
                var btnDir = buttonDir[dir];
                if(!btnDir) return false;
                setTimeout(function(){
                    var pDiv = $('.layout-button-'+btnDir).closest('.layout-expand').css({
                        textAlign:'center',lineHeight:'18px',fontWeight:'bold'
                    });
                    if(popts.title){
                        var vTitle = popts.title;
                        if(dir == "east" || dir == "west"){
                            var vTitle = popts.title.split('').join('<br/>');
                            pDiv.find('.panel-body').html(vTitle);
                        }else{
                            $('.layout-button-'+btnDir).closest('.layout-expand').find('.panel-title').css({textAlign:'left'}).html(vTitle)
                        }
                    }    
                },100);
            }
        });

    })(jQuery);

  • 相关阅读:
    Button 的CommandName 用法
    如何循序渐进向DotNet架构师发展
    用sqlserver进行分布式查询(链接服务器)(转)
    关于.resx
    OO设计原则总结
    为ASP.NET 2.0网站生成唯一程序集
    依赖倒置、控制反转和依赖注入辨析(转)
    通过http地址获取页面内容
    Sql同表去除重复
    动态启动WCF服务
  • 原文地址:https://www.cnblogs.com/Evelia/p/5029816.html
Copyright © 2011-2022 走看看