87,997
社区成员




$(this).children(":last").prev().after("<div class='bounty-add'><a target='_blank' href='bounties.php#/p=add&XID=" + playerId + "'>[Bounty]</a></div>");
$(this).children(":last").prev().after("<div class='info-add'><a href='#'>[Refresh]</a></div>");
$("div.bounty-add").css(addStyle);
$("div.info-add").css(addStyle);
$(this).children(":last").prev().children("a").click(function() {
alert("Hello");
});
$(document).on("click", "#info-add-" + playerId + " a", function() {
alert("OK" + playerId);
});
就搞定了,不过再请教一下,
为啥
$("#info-add-" + playerId).on("click", "a", function......)
这样就不行呢?id是唯一的,应该也可以准备获取相应的div啊。。。。
多谢