在js中监听某个class的点击事件
<span class="spanFun" >{{x.phoneRecords.hangUpReason}} </span>
//超长备注处理start
$(document).on("click", ".spanFun", function () {
var remarkDetail = $(this).text();
BootstrapDialog.show({
title: $translate.instant('user.remark'),
message: function (dialog) {
var $message = $(
'<span id="content_detail" style="word-break:normal; auto; display:block; white-space:pre-wrap;word-wrap:break-word ;overflow: hidden"' +
'</span>'
);
return $message;
},
onshown: function (dialogRef) {//打开完成
$("#content_detail").text(remarkDetail);
},
buttons: [
{
label: $translate.instant('common.yes'),
cssClass: 'btn-primary',
action: function (dialogItself) {
dialogItself.close();
}
}]
});
});
//超长备注处理end