2013-09-25 14 views
1

請查看我的Sample Fiddle ...的jQuery插件通知的點播功能不工作

有,來了一個通知欄。當我使用這個插件(here)時,該插件效果很好。實際上沒有關於這方面的文檔,我已經安裝並正在工作 - 一半。

當通知欄關閉時,會出現一個箭頭,該箭頭應點擊以重新啓動它。我可以看到那裏箭頭的影子,但它不會下降。

不知道如何使它自動拉下筆者顯示器here

這是用於調用該函數的腳本...

 $(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') }); 

      }); 

     }); 

的下拉箭頭在演示中工作,但不是我的網站。

你能看一下嗎?

謝謝,

回答

1

問題是網站演示你在哪裏得到的代碼;在該網站比如有與.button類buttonset通過使用cicked按鈕的ID切換通知行爲:

$('.notification.' + $(this).attr('id') + '').notify({ type: $(this).attr('id') }); 

你沒有那個按鈕,您可以直接使用您需要的通知類型。

type選項的可能值是:

  • 浮起
  • 固定
  • 按需

代碼:

$(document).ready(function() { 
    $('.notification.ondemand').notify({ type: 'ondemand' });  
}); 

演示:http://jsfiddle.net/IrvinDominin/qYsfD/

+0

你又做了一遍Ir​​vin。謝謝你,先生! – webfrogs

+0

如果我可以幫助你,我在這裏:-) –