【发布时间】:2016-11-15 00:22:28
【问题描述】:
我正在使用带有动态剔除列的 asp.net mvc。其中一个列标题“状态”应该有一个引导弹出框,用户可以在其中单击字体图标问号并提供一个包含该列信息的弹出框:
<script type="text/html" id="statusHead">
<th scope="col" class="nowrap" data-bind="css: cellClass, visible: visible">
<a href="#" id="toolTipFiles" data-bind="bootstrapPopover: {
html: true,
placement: 'left',
trigger: 'focus',
content: [
'<ul class=\' fa-ul\'>',
'<li><i class=\'fa-li fa fa-lg fa-circle status-red\'></i>Red: File will be deleted within this quarter.</li>',
'<li><i class=\'fa-li fa fa-lg fa-adjust status-yellow\'></i>Yellow: File will be deleted next quarter.</li>',
'<li><i class=\'fa-li fa fa-lg fa-circle-o status-green\'></i>Green: File will be deleted in more than one quarter.</li>',
'<li><i class=\'fa-li fa fa-lg fa-exclamation status-black\'></i>Black: Exception has been submitted but not yet approved or denied.</li>',
'</ul>'
].join(''),
title: '<center><b>\'Status\' indicates when the file will be deleted</b></center>'
}" data-content="">
<i class="fa fa-question-circle"></i>
</a>
</th> </script>
Visual Studio 不喜欢这种语法,我收到以下错误:
1.near data-bind:"如果该属性值用引号括起来,则引号必须匹配"
- 靠近
'<ul class='\:“缺少属性名称”
我相信我的所有引用都匹配,所以我不确定问题出在哪里。我尝试将双引号切换为单引号,将单引号切换为双引号,但是当这种情况发生时,弹出框永远不会打开。
【问题讨论】:
标签: javascript twitter-bootstrap knockout.js