0
돔에 불이 들어올 때까지 기다리는 스크립트가 있는데 기다리지 않는 것 같습니다. 문제는 내가 부트 스트랩 탭을 사용하고 있고 컨텐츠가 실제로 dom에 없다고 생각합니다.jquery 함수가 콘솔에서만 작동합니다.
jQuery를 콘솔에 붙여도 작동합니다. 이 문제를 jQuery로 해결할 수있는 방법이 있습니까? 아니면 강력한 Ajax 라이브러리가 필요합니까?
HTML/
/*@include('blocks.rotators.user-comments') loads in this*/
<div class="tab-pane fade" id="activityDetails">
<div class="comments-holder holder"></div>
<!-- item container -->
<ul id="comments-container" class="default-container quad-scroller">
<li>item</li>
</ul>
</div>
JS
/* when document is ready */
$(function() {
/*
* initiate the plugin without buttons and numeration
* setting midRange to 15 to prevent the breaks "..."
*/
$("div.comments-holder").jPages({
containerID: "comments-container",
first: false,
previous: "←",
next: "→",
last: false,
midRange: 15,
perPage: 4,
links: "blank"
});
});
게시 한 HTML이 DOM에 어떻게 추가 되었습니까? DOM 준비가 필요한 것이 확실합니까? 당신은 아약스가 필요하다는 것을 언급합니다 ... 당신은 질문 할 수있는 현실적인 대답을 줄 수있는 충분한 정보가 없습니다. –
내가 add() 할 때 Uncaught SyntaxError : Unexpected token이 발생합니다. 나는 또한 시도했다(); – ndesign11
이 오류는 없지만 여전히 작동하지 않습니다. \t \t \t}); \t}()); – ndesign11