Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

$.noty.defaults error Cannot read property 'style' of undefined #90

va5ja opened this Issue Sep 20, 2012 · 6 comments


5 participants

va5ja commented Sep 20, 2012

Hey there,

I have one problem. If I dowload the zip package and open allLayouts.html and at the bottom add before generateAll() also $.noty.defaults = { layout: 'top' }; nothing is working anymore.

Why is adding default to layout causing so much trouble?!


va5ja commented Sep 20, 2012

Ah oki, I figured. It's actually written wrong on the site under Options & Defaults. Default theme is not called default but it's defaultTheme. It should be corrected.

va5ja commented Sep 20, 2012

Found another bug if it is. If you go to Noty site and use console to trigger Noty then the following happens.

noty({text:'Test'}) noty({text:'Test'}) noty({text:'Test'})

Three such commands executed in a row end up in only one rendered Noty.

noty({text:'Test', layout:'topRight'}) noty({text:'Test', layout:'topRight'}) noty({text:'Test', layout:'topRight'})

Three such commands executed in a row end up in 3 rendered Noty.

Weird huh.

babca commented Oct 4, 2012

va5ja: thank you for the tip. I upgraded from previous version and it stopped working, changing theme to defaultTheme worked. Must be an uncomplete change in recent versions of Noty.

Devs should fix this, newbies will be confused.

va5ja commented Oct 4, 2012

Glad my post helped you or anyone :)

+1 for updating Installation section in readme - default options with:

theme: 'defaultTheme',

mplewis commented Jan 30, 2013

This fixed my problem as well. Use theme: 'defaultTheme' as an argument to noty settings.

@needim needim closed this Aug 28, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment