1

아래 링크를 통해 페이지 매김을위한 코드를 사용하고 있습니다. http://botmonster.com/jquery-bootpag/#.V5qvJ-0sjVM 하지만 나를 위해 작동하지 않습니다.부트 스트랩에서 페이지 매김을 사용하는 방법

<html> 
<head> 
    <script src="//code.jquery.com/jquery-2.1.3.min.js"></script> 
    <script src="//netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> 
    <script src="//raw.github.com/botmonster/jquery-bootpag/master/lib/jquery.bootpag.min.js"></script> 
    <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> 
</head> 
<body> 
    <div id="content">Dynamic Content goes here</div> 
    <div id="page-selection">Pagination goes here</div> 
    <script> 
     // init bootpag 
     $('#page-selection').bootpag({ 
      total: 10 
     }).on("page", function(event, /* page number here */ num){ 
      $("#content").html("Insert content"); // some ajax content loading... 
     }); 
    </script> 
</body> 
</html> 

저는 jquery에서 새롭게 추가되었습니다. 이것을 한 번 확인하고 제가하고있는 실수를 알려주십시오.

감사합니다.

+0

? 사람들이 실제로 무슨 일이 일어나는지 모른다면 – CynePhoba12

+0

브라우저에서 2 줄 밖에 보이지 않습니다. \ n "동적 콘텐츠가 여기에 있습니다. 페이지 매김이 여기에옵니다. \ n. –

+0

오류 : - TypeError : $ (...). bootpag가 함수가 아닙니다. –

답변

1

문제는 jquery-bootpag JS 파일을 github에서 직접 연결할 수 없다는 것입니다. 중 하나는 환경에 로컬로 업로드하거나 뭔가에 대한 링크를 변경 : 당신의 수입은 다음과 같이되도록,

//rawgit.com/botmonster/jquery-bootpag/master/lib/jquery.bootpag.min.js :

받고있는 어떤 오류
<script src="//code.jquery.com/jquery-2.1.3.min.js"></script> 
<script src="//netdna.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> 
<script src="//rawgit.com/botmonster/jquery-bootpag/master/lib/jquery.bootpag.min.js" type="text/javascript"></script> 
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> 
+0

정확히 문제가 있습니다! 'jquery.bootpag.min.js'를 로컬에서 간단히 복사하고 로컬로 저장하여 로컬에서 다운로드하십시오. –