Reputation: 7345
$('.reply').click(function () {
var replybox = $(".replybox").clone().show();
$(replybox).appendTo(this,parent('.post'));
});
What I'm trying to do:
Upvotes: 0
Views: 342
Reputation: 87073
$('.reply').click(function () {
var replybox = $(".replybox:hidden"); // take a reference of replybox
$(this).parent('.post').append(replybox.clone().show());
});
Upvotes: 1
Reputation: 28437
$(".reply").click(function () {
$(this).parent(".replybox").clone().hide().appendTo($(this).parents(".post")).fadeIn("slow")
});
But I'm still not sure what you want or what your HTML structure is, so probably this isn't what you want.
Upvotes: 1
Reputation: 652
$('.reply').click(function () {
$(this).parent('.post').append($(".replybox").clone().show());
});
Upvotes: 1