我有一个带有控件的 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/