0
녹아웃을 사용하여 일부 데이터를 바인딩하고 있습니다. 무엇이 잘 작동하고 있습니다. 하지만 이제는 일부 데이터를 바인딩해야하며 사용자가 마우스를 지나치면 일부 정보가 포함 된 메시지가 표시되어야합니다. 메시지호버에 대한 녹아웃 문제
**My CSS:**
.message{
display:none;
color:#000;
background:#999;
position:absolute;
top:10px;
}
.mo:hover .message{
background-color: yellow !important;
display:block !important;
z-index:10;
}
내 HTML :
function getGrayStatus() {
return "<a href='#'>" +
"<span class='mo' style='background-color:gray; padding-left: 100%;'>" +
"<p class='message'><b>my message</b></p>" +
"</span>" +
"</a>";
}
JS 바인드 코드 : HTML에서
main.sellers.push(
{
sellerCode: "1", totalClientsInRoute: "45", visitedClientsInRoute : "32",
notVisitedClientsInRout: "2", clientsWithSaleInRoute: "1",
percentageOfClientsWithSalesInRoute: "15", visitsOutOfPointInRoute: "1",
totalClientsOutOfRoute: "11", clientsWithSaleOutOfRoute: "15",
sales: [{ sale: getRedStatus() }, { sale: getGreenStatus() }, { sale: getGrayStatus() }}
바인딩 :
<div class="dashboard-sellers-table-sales">
<div class="table-row" data-bind="foreach: sales">
<div class="table-cell" data-bind="html: sale"></div>
</div>
</div>
바인딩이 작동하고 있습니다. 문제는 메시지가 표시되지 않는다는 것입니다. 녹아웃을 사용하지 않고 테스트를하면 메시지가 표시됩니다.
감사합니다! 잘 했어 !! –