1
div에 대한 의견 섹션을 표시하거나 숨기려면 jquery 토글이 있습니다. 그러나 나는 코멘트 섹션 paginating, 어떤 이유로 아약스 요청 표시/숨기기 작업을 중지합니다. 어떤 아이디어 야?Ajax 요청 후 div 표시가 작동하지 않음 - Javascript/Ajax
JQuery와 코드
$('.show-all-comments').click(function() {
$(this).parent().next('.comments-box').slideToggle("fast"); //slide following class called .comments-box
});
jQuery(function($) { //function for pagination.
$('.post-list').on('click', '#pagination a', function(e){
e.preventDefault();
var link = $(this).attr('href');
console.log(link);
$('.post-list').fadeOut(200, function(){
$(this).load(link + ' .post-list', function() {
var link = $(this).attr('href');
$(this).fadeIn(100);
});
});
})
HTML 출력 내가 매김을 제거하면이 그것을
감사를 작동 할 수 있도록 페이지의 모든 글보기
<div class="large-5 medium-5 small-12 columns">
<a class="show-all-comments btn-third-priority">See Comments</a>
</div>
<div class="large-7 medium-7 small-12 columns">
<p style="padding-top: 10px; margin-bottom: 4px; font-size:0.9em;">One Response to "Post"
</div>
<div class="comments-box">Content</div>
,
DIM3NSION