国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
基于1.3.3版本tooltip的datagrid單元格tip實(shí)現(xiàn)
/**   * 擴(kuò)展兩個(gè)方法   */$.extend($.fn.datagrid.methods, {    /**     * 開打提示功能       * @param {} jq       * @param {} params 提示消息框的樣式       * @return {}       */    doCellTip: function (jq, params) {        function showTip(data, td, e) {            if ($(td).text() == "")                return;            data.tooltip.text($(td).text()).css({                top: (e.pageY + 10) + 'px',                left: (e.pageX + 20) + 'px',                'z-index': $.fn.window.defaults.zIndex,                display: 'block'            });        };        return jq.each(function () {            var grid = $(this);            var options = $(this).data('datagrid');            if (!options.tooltip) {                var panel = grid.datagrid('getPanel').panel('panel');                var defaultCls = {                    'border': '1px solid #333',                    'padding': '1px',                    'color': '#333',                    'background': '#f7f5d1',                    'position': 'absolute',                    'max-width': '200px',                    'border-radius': '4px',                    '-moz-border-radius': '4px',                    '-webkit-border-radius': '4px',                    'display': 'none'                }                var tooltip = $("<div id='celltip'></div>").appendTo('body');                tooltip.css($.extend({}, defaultCls, params.cls));                options.tooltip = tooltip;                panel.find('.datagrid-body').each(function () {                    var delegateEle = $(this).find('> div.datagrid-body-inner').length                            ? $(this).find('> div.datagrid-body-inner')[0]                            : this;                    $(delegateEle).undelegate('td', 'mouseover').undelegate(                            'td', 'mouseout').undelegate('td', 'mousemove')                            .delegate('td', {                                'mouseover': function (e) {                                    if (params.delay) {                                        if (options.tipDelayTime)                                            clearTimeout(options.tipDelayTime);                                        var that = this;                                        options.tipDelayTime = setTimeout(                                                function () {                                                    showTip(options, that, e);                                                }, params.delay);                                    } else {                                        showTip(options, this, e);                                    }                                },                                'mouseout': function (e) {                                    if (options.tipDelayTime)                                        clearTimeout(options.tipDelayTime);                                    options.tooltip.css({                                        'display': 'none'                                    });                                },                                'mousemove': function (e) {                                    var that = this;                                    if (options.tipDelayTime) {                                        clearTimeout(options.tipDelayTime);                                        options.tipDelayTime = setTimeout(                                                function () {                                                    showTip(options, that, e);                                                }, params.delay);                                    } else {                                        showTip(options, that, e);                                    }                                }                            });                });            }        });    },    /**     * 關(guān)閉消息提示功能       * @param {} jq       * @return {}       */    cancelCellTip: function (jq) {        return jq.each(function () {            var data = $(this).data('datagrid');            if (data.tooltip) {                data.tooltip.remove();                data.tooltip = null;                var panel = $(this).datagrid('getPanel').panel('panel');                panel.find('.datagrid-body').undelegate('td',                                'mouseover').undelegate('td', 'mouseout')                                .undelegate('td', 'mousemove')            }            if (data.tipDelayTime) {                clearTimeout(data.tipDelayTime);                data.tipDelayTime = null;            }        });    }});
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊舉報(bào)。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
easyui 部分封裝方法
datagrid嵌套combogrid 上下左右鍵
easyui dataGrid擴(kuò)展
鼠標(biāo)移動(dòng)彈出提示框信息
day12
EasyUi的DataGrid組件擴(kuò)展,顯示統(tǒng)計(jì)當(dāng)前頁信息
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服