I have one cshtml file and I am working in nocommerce. I am using data-content to display content when any one hover on product.
For simple text it is working fine but for HTML tags also it is displaying like simple text and not applying HTML, please check image and code below for more detail.
<div data-html="true" data-content="<div><b>Test</b> </div>" class="product-item" data-productid="@Model.Id">
Also I have applied css for this as below :
.product-item:after {
content: attr(data-content);
color: #fff;
position: absolute;
width: 100%;
height: 100%;
top: 0px;
background: rgba(0,0,0,0.6);
opacity: 0;
transition: all 0.5s;
-webkit-transition: all 0.5s;
}
.product-item:hover:after {
opacity: 1;
}
With html it is displaying with HTML tag, so need help to solve this?