我試圖創建一個模式窗口,它將在某些條件下打開。 我確實創建了一個模式窗口,當點擊按鈕時打開。我應該改變什麼?我應該如何在特定條件下處理來自控制器的調用模式窗口
我的觀點:
<button type="button" data-toggle="modal" data-target="#popupModal">open</button>
<div id="popupModal"
class="modal hide fade"
tabindex="-1"
role="dialog"
aria-labelledby="popupModalLabel"
aria-hidden="true">
...some html
</div>
</div>
我的控制器:
if (some conditions)
{
//here i want to open my modal window somehow
}
你正在使用引導模式? –
@mathiasfc,是 –
我用一個例子更新了我的答案,任何疑問都問我。 –