2013-10-30 35 views
1

我一直試圖把一個鏈接中的消息,即時消息發送使用notyjs(http://needim.github.io/noty/)。我不想使用按鈕,只是一個鏈接。我如何添加一個鏈接到notyjs短信

var n = noty({text: 'Hi there click, <a href="http://somehere.com">here</a> to continue'}); 

問題是消息顯示與鏈接,但是當我點擊。它什麼也沒做。

有什麼想法?謝謝

+0

試試這個 '變種N = noty({文字: '你好點擊' + here + '繼續'});' –

回答

1

默認情況下noty關閉點擊容器中的任何位置。爲了防止這種情況,您應該更改closeWith參數。修改後的代碼如下。

var n = noty({text: 'Hi there click, <a href="http://somehere.com">here</a> to continue',closeWith:['button']}); 

JS小提琴:http://jsfiddle.net/nGDvU/

相關問題