javascript - 忽略包含下拉菜单的 gridview 单元格

标签 javascript jquery

我有一个带有控件的 GridView 。 GridView 有 css 类“grid”。

我正在循环 GridView 并选择其中的文本,但我不想选择此 GridView 中的下拉列表内的文本。

$('.grid tr td').live('mouseover',
        function () {
                $(this).attr("title", $(this).text());
                $(this).aToolTip({
                    // no need to change/override  
                    closeTipBtn: 'aToolTipCloseBtn',
                    toolTipId: 'aToolTip',
                    // ok to override  
                    fixed: false,                   // Set true to activate fixed position  
                    clickIt: false,                 // set to true for click activated tooltip  
                    inSpeed: 200,                   // Speed tooltip fades in  
                    outSpeed: 100,                  // Speed tooltip fades out  
                    tipContent: '',                 // Pass in content or it will use objects 'title' attribute  
                    toolTipClass: 'defaultTheme',   // Set class name for custom theme/styles  
                    xOffset: 5,                     // x position  
                    yOffset: 5,                     // y position  
                    onShow: null,                   // callback function that fires after atooltip has shown  
                    onHide: null                    // callback function that fires after atooltip has faded out  
                });


        });

这是我的 jquery 代码,用于循环网格,但我不知道如何从此循环中过滤下拉列表。

我尝试了$('.grid tr td').not('.dropdownCssClass').live('mouseover', 但不工作 请帮助我。

最佳答案

尝试使用以下选择器:

$('.grid tr td:not(:has(select))')

$('.grid tr td:not(:has(.dropdownCssClass))')

关于javascript - 忽略包含下拉菜单的 gridview 单元格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17316827/

相关文章:

javascript - backbone.queryparams.js 无法在 IE 上运行

javascript - 所有其他代码运行后出现模态弹出加载屏幕

javascript - 在 Javascript 对象上调用 jQuery 函数的惯用方法是什么?

javascript - 文档就绪,$(document).on ("xxx") 和函数 onDeviceReady()

javascript - dom 加载后包含外部脚本

javascript - 如何通过单击移动图层

javascript - 为什么我的 "click"事件监听器不能为我的删除按钮工作?

javascript - 在路由器中动态安装引擎

javascript - 在backbone.js中添加两个事件

JavaScript 动画