jQuery的:排除元素 [英] Jquery: exclude element
本文介绍了jQuery的:排除元素的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有以下的code:
$(document).ready(function()
{
$('a[rel]').each(function()
{
$(this).qtip(
{
content: {
text: '<img class="middle" src="i/icon_processing.gif" alt="l">Loading...',
ajax: {
url: $(this).attr('rel')
},
title: {
text: $(this).text(),
button: true
}
}
})
.click(function() { return false; });
});
});
这code对网页上的所有相对的有醉意的jQuery插件工作。 问题是,我有一个特定的div一些ID,保存内容相对需要被排除在该功能。
This code make all rel's on pages to work with tipsy jquery plugin. The problem is that i have a specific div with some id, that holds content with rel that needs to be excluded from this function.
推荐答案
您可以使用不是()
来排除元素:
You could use not()
to exclude elements:
$('a[rel]').not('#IdOfElement').each(function()
这篇关于jQuery的:排除元素的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文