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

Hide window with bootstrap hidden-xs class

2 Answers 230 Views
Window
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 25 Aug 2015, 04:00 PM

Hi there,

I have a Telerik window opened on page load based on server side variables.  However, I don't want this window to display for mobiles - for other site controls I apply the bootstrap 'hidden-xs' class to the control to not render it, but this doesn't work on the Kendo Window control.  How can I achieve this - my window is drawn out by server side code which knows nothing about the browser dimensions?

I also tried setting the .Visible property to false and then showing it on the Open() event based on some jQuery - but this didn't work because the Open() event doesn't get triggered if the .Visible property is initially set to false.

Please can you advise how I can go about achieving my requirements?

Thanks, Mark

2 Answers, 1 is accepted

Sort by
0
Accepted
Iliana Dyankova
Telerik team
answered on 27 Aug 2015, 03:05 PM
Hi Mark,

You could achieve a similar behavior with Kendo UI Window using the following CSS:
@media only screen and (max-width: 767px) {
   .k-window {
       display: none !important;
   }
}

Regards,
Iliana Nikolova
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Mark
Top achievements
Rank 1
answered on 27 Aug 2015, 03:52 PM

That worked perfectly.

Thanks, Mark

Tags
Window
Asked by
Mark
Top achievements
Rank 1
Answers by
Iliana Dyankova
Telerik team
Mark
Top achievements
Rank 1
Share this question
or