$('#detail').find('p.contract_number').html('<span class="tooltip-demo" ><span class="text-ellipsis" data-toggle="tooltip" data-placement="bottom" title="'+contract_number_str+'" >'+contract_number_str+'</span></span>');
$(".tooltip-demo").tooltip()
动态给id为 detail的弹窗中的p标签设置内容 。 移入展示全部。 离开展示 文字。超出部分展示...
移入的时候大概展示的样式是
.tooltip-demo span {
1. display: inline-block;
1. max-width: 100%;
.text-ellipsis {
1. white-space: nowrap;
1. overflow: hidden;
1. text-overflow: ellipsis;