$("a.close").click(function() {
var id = $(this).attr("id");
alert(id);
$(this).parents("div.venue:first").fadeOut("Fast");
return false;
});
任何想法爲什麼警報不正確彈出當前的div ID?jQuery ID attr
最終代碼,感謝下面指着我的愚蠢錯誤
var id = $(this).parents("div.venue:first").attr("id");