This is a migrated thread and some comments may be shown as answers.

On hide don't remove from DOM

1 Answer 117 Views
Notification
This is a migrated thread and some comments may be shown as answers.
Bilal
Top achievements
Rank 2
Bilal asked on 20 Feb 2015, 02:57 PM
Hi,
I noticed when hiding a notification, the notification gets removed from DOM hence, the entire UI I have shifts up to replace the gap that was filled by notification.

Is there a way to just hide the notification without removing it from DOM?

Best regards
Bilal Haidar

1 Answer, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 24 Feb 2015, 09:40 AM
Hi Bilal,

The fact that your UI shifts suggests that the some static notifications are displayed inside a container with no height. I recommend using a fixed height container for the notification messages, just like in this demo:

http://demos.telerik.com/kendo-ui/notification/index

Alternatively, you can use min and/or max height styles for the container.

On the other hand, popup notification messages have no influence on the remaining page content, so you can choose this approach too.

There is no built-in way to only hide notification messages without removing them from the DOM. A possible approach is to configure the notifications to be always visible and hide them manually with custom Javascript and a visibility:hidden style.

http://docs.telerik.com/kendo-ui/api/javascript/ui/notification#configuration-autoHideAfter

Regards,
Dimo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Notification
Asked by
Bilal
Top achievements
Rank 2
Answers by
Dimo
Telerik team
Share this question
or