2016-10-21 3 views
0

부트 스트랩으로 팝 오버를 시도하고 기존 div 포맷을 유지하려고합니다.LI의 부트 스트랩 Popover

어떻게 작동 시키려면 아래 코드를 수정해야합니까?

<ul class="list-group" data-bind="foreach: courses"> 
    <li class="list-group-item CourseHover" data-bind="css: { hidden : isSatisfied}" data-toggle="popover" title="Popover title" data-content="And here's some amazing content. It's very engaging. Right?"> 
    <a tabindex="0" class="" role="button" data-toggle="popover" data-trigger="focus" title="Dismissible popover" data-content="And here's some amazing content. It's very engaging. Right?"> 
      <div class="row"> 
       <div class="col-sm-10"> 
        <span data-bind="text:courseName"></span> 
       </div> 
       <div class="col-sm-2"> 
        <span data-bind="text:courseCredits"></span> cr 
       </div> 
      </div> 
    </a> 
</li> 

답변

0

Popovers는 initialized by jquery해야합니다.

트릭을 할해야이 코드는 :

$(function() { 
    $('[data-toggle="popover"]').popover() 
}) 
당신은 또한 당신의 앵커 태그에 데이터 배치 = "바닥"또는 데이터 배치 = "최고"를 넣어 할 수 있습니다

이 - 팝 오버가 다르게 나타날 수 있습니다 오른쪽으로.

관련 문제