読んでくれてありがとう。
コメントのリストがあり、各コメントには返信リンクがあります。リンクをクリックすると、その個々のコメントのフォームが表示されます。
私は困惑している。私はこのjqueryを書きましたが、それが意味をなさないことさえ知っています。
<script>
$('.reply-comment').click(function(){
var CommentID = $(this).attr('id');
$(this).hide();
$('.reply-comment-form').show( function(){
$('.reply-comment-form-'+CommentID).html();
});
return false;
});
</script>
ここにフォームがあります
<div class="reply-comment-form well">';
<form name="reply-form" id="reply-form" method="POST">
<textarea name="Comment" rows="6" class="span10"></textarea> <br />
<input type="submit" class="btn btn-primary replycommentsubmitbutton" value="Yanitla" />
</form>
</div>
フォームを表示するために、すべてのコメントの下にスパンを追加しました
<div>
comments text etc etc...
</div>
<a href="" class="reply-comment" id="<?php $v['CommentID'] ?>"> Reply </a>
<span id="reply-fomment-form-<?php $v['CommentsID'] ?>"></span>
html() 関数で show() 関数を使用するにはどうすればよいですか、それとも別の方法がありますか?
手伝っていただけませんか?ありがとう。