我正在尝试将动作的结果呈现为模态(twitter bootstrap)。不幸的是我没有得到这个工作。
在我在每个迭代器中生成链接之前:
<g:link action="perform" id="${exerciseInstance.id}">
<h2>${fieldValue(bean: exerciseInstance, field: "title")}: (${exerciseInstance.questions.size()} Questions)</h2>
</g:link>
而不是呈现一个完整的新网站,我更希望测验以模式呈现。因此,我尝试了一个简单的 twitter 引导模式示例:
<a data-toggle="modal" href="#myModal" class="btn btn-primary btn-large">${fieldValue(bean: exerciseInstance, field: "title")}</a>
<div id="myModal" class="modal hide fade" style="display: none; ">
<div class="modal-header">
<h3>Test</h3>
</div>
<div class="modal-body">
--> This is where the content should go <--
</div>
<div class="modal-footer">
<a href="#" class="btn" data-dismiss="modal">Close</a>
</div>
</div>
实现这一目标的最佳方法是什么?