发布 jquery 响应后未更新演示页面DOM 元素我正在使用此插件用于 jquery链接并结合此脚本:
$(document).ready(function() {
$("#produtos_div").scroll(function() {
if ($(this).scrollTop() + $(this).height() == $(this).get(0).scrollHeight) {
$.ajax({
type: "post",
url: "more.php",
success: function(data) {
$("#produtos_div").append(data);
$.post('addMenuShoppingCart.php', function(return){
$('#result').append(return);
stickytooltip.init("*[data-tooltip]", "mystickytooltip");
})
},
error: function() {
}
});
});
加载时有效,但是当您滚动并包含帖子中的 div 元素并尝试重新加载插件时,出现错误:对象不支持此属性或方法。由于在具有新属性的 div 中输入新元素,但没有任何效果。如果有人知道什么,请帮忙。