-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot create different options for the different classes of gritter. #13
Comments
You should do it like this:
If that doesn't work: could you tell me what Ruby and Rails version you're using? |
Hello Robin, |
There is a part in the documentation that shows you need to use the :value key to set a value per gritter notification. I don't really know how I can explain it more clearly. If you have a suggestion: feel free to add a pull request or add it as a comment. The success notification isn't fading, because 'sticky' is set to true. When sticky is true, the gritter message won't disappear by itself. The user has to click on the close-box to make it go away. That's why the close-box appears on mouse-over. So sticky isn't for making the notice permanent. The user can still make it go away. ;) |
Thanks again for clearing this up for me Robin. I double checked with the original gritter demo website, and in fact I didn't realize that the notification window ALWAYS has a close box if you hover over it. Therefore if I want the desired behaviour of popping up a notification box for a longer time, ( so the user won't miss it ) but provide an option for more diligent users to dismiss the notification box earlier, all I have to do is create a notification with As far as the documentation goes I think the corrected version of my attempt that you gave me I think illustrates what one has to do quite clearly. Perhaps you can substitute that for your easy example: So instead of this...
replace it with this...
I left out the time feature in the first line since the :sticky option over rides the fade out timer. What confused me was later in your documentation you showed the example:
So I saw the attribute :value being used to set a 'true' value, so it didn't occur to me that you can use it to supply the text for your notification. Thanks again for all your help and time |
Thanks for your feedback. I changed the README a bit to explain it in more detail: .... You can change the default time, sticky and class_name options for each gritter message.
When you don't pass a
.... |
According to the documentation, if I did this...
The success gritter should behave differently than the warning gritter, i.e. one you can optionally dismiss, and the other you have to wait for the time out for it to fade. If I execute this, both of my messages, the success and the warning fade out after 7 secs. I don't think this is right is it??
The text was updated successfully, but these errors were encountered: