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

Detect Current State of Drawer

3 Answers 104 Views
Drawer (Mobile)
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 14 Nov 2014, 05:46 PM
Is there a way to check the current state of a kendoMobileDrawer to determine if the drawer is open or closed via a field or method on the object? If not - what's the recommended approach for determining this?

3 Answers, 1 is accepted

Sort by
0
Accepted
Kiril Nikolov
Telerik team
answered on 17 Nov 2014, 01:14 PM
Hello Ryan,

You can use the visible property of the Drawer object reference, that will tell you whether the drawer is visible or not. Here is the code that you can use:

$('[data-role=drawer]').getKendoMobileDrawer().visible //will return boolean proerty

I hope this information helps.

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Ryan
Top achievements
Rank 1
answered on 18 Nov 2014, 04:00 PM
Perfect. That's what I needed - thank you. You may want to consider adding that information to your API documentation: http://docs.telerik.com/kendo-ui/api/javascript/mobile/ui/drawer.
0
Kiril Nikolov
Telerik team
answered on 19 Nov 2014, 08:29 AM
Hello Ryan,

Good point!

Just added it here:

http://docs.telerik.com/kendo-ui/api/javascript/mobile/ui/drawer#fields

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Drawer (Mobile)
Asked by
Ryan
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Ryan
Top achievements
Rank 1
Share this question
or