[英]jQuery Notification plugin on-demand function not working
請查看我的樣本小提琴 ...
出現一個通知欄。 當我使用此插件( 在此處 )時,該插件效果很好。 確實沒有關於此的文檔,並且我已經安裝並正常工作了-半途而廢。
通知欄關閉后,將出現一個箭頭,單擊該箭頭即可重新啟動它。 我可以從那里的箭頭中看到陰影,但是它沒有降下來。
作者在此處顯示時,不確定如何使其自動下拉
這是用於調用函數的腳本...
$(document).ready(function () {
$('.notification.ondemand').notify();
$('.button').click(function () {
$('.notification').removeClass('hide').addClass('hide').removeClass('visible');
$('.notification.' + $(this).attr('id') + '').notify({ type: $(this).attr('id') });
});
});
下拉箭頭適用於演示,但不適用於我的網站。
你能看看嗎?
謝謝,
問題是在站點演示中您從哪里獲得代碼。 站點中的示例中,存在與類buttonset .button
通過使用cicked按鈕的ID切換通知行為:
$('.notification.' + $(this).attr('id') + '').notify({ type: $(this).attr('id') });
您沒有該按鈕,因此可以直接使用所需的通知類型。
type
選項的可能值為:
碼:
$(document).ready(function () {
$('.notification.ondemand').notify({ type: 'ondemand' });
});
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.