답변 1개
댓글을 단 이후 코맨트박스까지 스크롤을 시키면 될것 같습니다.
fviewcomment_submit(f)안에서
..
// ajax comment system
$.ajax({
url: f.action,
type: 'POST',
data: $(f).serialize(),
dataType: 'html',
})
.done(function(str) {
var tempDom = $('<output>').append($.parseHTML(str))
var title = $('title', tempDom).text()
if (title === '') {
// 1. commentBox 원위치
comment_box('', 'c')
// 2. commentBox Form 리셋
f.reset()
// 3. 코멘트 출력
$.ajax({
url: str,
type: 'GET',
dataType: 'html'
})
.done(function(str2) {
var tempDom2 = $('<output>').append($.parseHTML(str2))
$('ajaxcomment').replaceWith($('ajaxcomment', tempDom2))
var comment_bottom = $("#bo_vc").offset().top + $("#bo_vc").height();
$("html, body").animate({scrollTop:comment_bottom}, '500');
})
}
..
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인