2016-10-17 2 views
-2

슬라이드를 움직이지 않고 컨트롤을 클릭했을 때 응답하지 않는 부트 스트랩 슬라이더가 있습니다. 첫 번째 사진을 볼 수는 있지만 어디를 클릭해도 다른 이미지에 액세스 할 수 없습니다. 이 스크립트가 아래에서 작동합니까? 상세이 부트 스트랩 스크립트가 응답/작동하지 않는 이유는 무엇입니까?

<head> 
<!-- Latest compiled and minified CSS --> 
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> 

<!-- Latest compiled and minified JavaScript --> 
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" ></script> 
<script src="js/jquery.js"></script> 
<script src="js/jquery-migrate-1.1.1.js"></script> 
<script src="js/script.js"></script> 

    </head> 


<body> 
    <div id="carousel-example-generic" class="carousel slide" data-ride="carousel"> 
    <!-- Indicators --> 
    <ol class="carousel-indicators"> 
    <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li> 
    <li data-target="#carousel-example-generic" data-slide-to="1"></li> 
    <li data-target="#carousel-example-generic" data-slide-to="2"></li> 
    </ol> 

    <!-- Wrapper for slides --> 
    <div class="carousel-inner" role="listbox"> 
    <div class="item active"> 
     <img src="http://placehold.it/450x350" alt="Slide 1"> 
     <div class="carousel-caption"> 
     Caption Slide 1 
     </div> 
    </div> 
    <div class="item"> 
     <img src="http://placehold.it/450x350" alt="Slide 2"> 
     <div class="carousel-caption"> 
     Caption Slide 2 
     </div> 
    </div> 
    <div class="item"> 
     <img src="http://placehold.it/450x350" alt="Slide 3"> 
     <div class="carousel-caption"> 
     Caption Slide 3 
     </div> 
    </div>   
    </div> 

    <!-- Controls --> 
    <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev"> 
    <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span> 
    <span class="sr-only">Previous</span> 
    </a> 
    <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next"> 
    <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> 
    <span class="sr-only">Next</span> 
    </a> 
</div> 
</body> 
+1

브라우저의 콘솔에 어떤 오류가 있습니까? 그리고 부트 스트랩 전에 jQuery를 포함시켜야합니까? – j08691

+2

jquery 위아래에 부트 스트랩 js를 추가하십시오. –

+0

@KinshukLahiri : 간단합니다. 고마워요. –

답변

1

:

부트 스트랩은 첨부 일부 JQuery와 이벤트가있는 JS 파일입니다. 그리고 jquery 스크립트를 그 아래에두면 이벤트가 첨부되지 않습니다. 따라서 jquery를 항상 위에 추가하여 이벤트를 첨부해야합니다.

희망 설명 :

관련 문제