I am using MVC5 and I have an ellipsis for a span in my view for which I want to display the title when I hover over it. The truncated value/text of span will display only after choosing any checkbox from the list of options. I have done following so far; but i am having hard time to get title in my view title="???"
.
<div>
<span>PAYMENT TYPE: </span>
<span id="payment-sum" title="???"></span>
</div>
function setPayment() {
var sum = $('input[name=payment-option]:checked').parents('.lbl-option').text().trim();
$('#payment-sum').text(sum);
$('#payment-sum').attr(sum);
}
I think you can do something like this to get the title in the span:
$('#payment-summary').attr("title", summary);
Let me know if that helps you!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.