InuYaksa의 답변 이외에도 구현에 대한 액세스 권한이없는 경우 해결 방법으로 내용 래퍼에 mouseover 함수를 구현할 수 있습니다.
// Call resize whenever mouse
$("#scroll-area").mouseover(function() {
$("#scroll-area").getNiceScroll().resize();
});
에서 : http://eureka.ykyuen.info/2013/05/07/jquery-nicescroll-plugin-doesnt-work-for-dynamic-content/이
개선 된 마우스 오버 솔루션 뷰포트를 사용
//in the case of scrolling content loaded via AJAX
$(document).on('mouseover','#scroll-area', function() {
$(this).getNiceScroll().resize();
});
/
$(document).on('mouseover','#scroll-wrap', function() {
var widget_wrap=$(this);
var widget_viewport=$(this).parent();
widget_viewport.getNiceScroll(widget_wrap).resize();
});
대부분의 경우 포장, 당신은 A 전에 좋은 스크롤을 초기화하는 jax 요청이 완료되었습니다. Ajax 요청의 success 이벤트 핸들러에서 멋진 스크롤을 초기화 해 보라. – Tariqulazam
문제는 내가 홈 페이지 (Ajax가로드 된 곳)에 가서 작동하지만 정적 페이지 (예 : 연락처)로 이동 한 다음 아약스를로드하는 메뉴 항목을 클릭하면 작동하지 않는다는 것입니다. 내가 창 크기를 바꿀 순간. –
우리가보기에 바이올린에 코드를 포함시킬 수 있습니까? – Tariqulazam