qTip 和 .Live() 数据
简而言之, 我当前正在显示结果列表...然后我在结果上放置一个过滤器并使用 jQuery 中的 .live() 提取另一个结果列表。
当我使用 qTip 时,这不是我的问题。目前的运行情况有点像这样......没有所有细节。
$('.contact').each(function() {
$(this).qtip({
// These are my options within here
});
});
这是我使用 .live() 功能过滤结果的代码。
$('.filterContacts').live('click', function(){
var filterId = $(this).attr('id');
$.ajax({
url: 'classes/class.Post.php?a=filterContacts',
dataType: 'html',
data: {
filter: filterId
},
success: function (responseText) {
$(".contacts").html(responseText);
},
error: function() {
alert("Oops... Looks like we're having some difficulties.");
}
});
return false;
});
所以现在我的 qTip 不喜欢处理我的过滤结果...我能做些什么吗?任何帮助将不胜感激!
更新: .contacts 是一个包含所有 .contact div 的 div。 IE:
<div class="contacts">
<div class="contact">FistName, LastName</div>
<div class="contact">FistName, LastName</div>
<div class="contact">FistName, LastName</div>
</div>
In Short,
I am currently showing a list of results... and then I place a filter on the results and pulls another list of results, using the .live() within jQuery.
Not my problem comes when i'm using qTip. Which currently runs somewhat like this... without all the details.
$('.contact').each(function() {
$(this).qtip({
// These are my options within here
});
});
This if my code for filtering my results using the .live() feature.
$('.filterContacts').live('click', function(){
var filterId = $(this).attr('id');
$.ajax({
url: 'classes/class.Post.php?a=filterContacts',
dataType: 'html',
data: {
filter: filterId
},
success: function (responseText) {
$(".contacts").html(responseText);
},
error: function() {
alert("Oops... Looks like we're having some difficulties.");
}
});
return false;
});
So now my qTip doesn't like to work on my filtered results... is there anything that I am able to do? Any help would be appreciative!
UPDATE:
.contacts is a div that surrounds all of the .contact divs.
IE:
<div class="contacts">
<div class="contact">FistName, LastName</div>
<div class="contact">FistName, LastName</div>
<div class="contact">FistName, LastName</div>
</div>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该在成功块中执行代码。
you should execute your code in the success block.