日期:2014-05-17  浏览次数:20421 次

$.post以后就取不到$(this)节点了?

<script type="text/javascript">
    $(document).ready(function () {
        $(".user_sidebar").children("li").children("a").eq(7).addClass("cur");
        $(".btn3").click(function () {
            if (confirm("你确定要取消对" + $(this).parents(".p_follow").children(".right_box").children(".UInfo_box").children(".NickName").html() + "的关注吗?")) {
                $.post("ashx/AttP/Attp.ashx", { uid: $(this).parents(".p_follow").attr("id") }, function (data, status) {
                    if (status == "success") {
                        if (data == "1") {
                            $(this).parents(".p_follow").remove();
                        }
                        else {
                            alert("取消关注失败");
                        }
                    }
                });
            }
            else {
            }
        });
    });
</script>

取消关注以后删除类标签为p_follow的父节点  结果在$.post以后就取不到$(this)节点了?是生命周期的问题么?还是什么?求指点~
jquery asp.net $.post 异步