0
我有一個共同的模式都在我的網站顯示尾註。我想創建一個快速的帕格混搭,所以我不必一遍又一遍地輸入結構。通哈巴狗混入到JavaScript的
不過,我不知道如何#ID傳遞到我的js toggle_visibility功能。 (請注意,js的作品完美,我只是想轉換到一個mixin)
mixin modal(id, content)
div.modal(class= id)
div.modal-content= content
a.close(onclick="toggle_visibility('= id');") Close
這裏的哈巴狗碼工作的一個例子(混入外)
div.modal#downloads-citations
div.modal-content
p some content here to show article citations
a.close(onclick="toggle_visibility('downloads-citations');") Close
完美地工作。謝謝!!!! –
樂於幫忙,歡迎來到Stack Overflow!如果此答案解決了您的問題,請將其標記爲已接受。 – gandreadis