Jean Jean -4 years ago 136
Javascript Question

notify.js options are not working

I have the following code on my document.ready

$.notify("Your class starts in 15min", "info", {
clickToHide: false,
autoHide: false,
globalPosition: 'top center'

but nothing happen, I only get the text and the info type, but autohide and globalposition it's not working.

What I'm doing wrong.

thanks for your helps

Answer Source

I just created a jsFiddle with your given information and everything works fine when you use

$.notify("Your class starts in 15min", {
  clickToHide: false,
  autoHide: false,
  globalPosition: 'top right'

The problem was that you used the style information ('info') as the second constructor, which actually expects an object of options $.notify( string|object, [ options ]).

Please note that I used jQuery 2.1.0 and notifyJS v0.3.1.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download