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

Validate if window is already open

1 Answer 360 Views
Window
This is a migrated thread and some comments may be shown as answers.
Hugo
Top achievements
Rank 1
Hugo asked on 23 Aug 2012, 01:17 PM
Hi all,

I was wondering if there is a way to validate if a kendo window is already open ?

I mean I want to do something really simple.

Just an if that will check if the window is already opened.

Thank you

1 Answer, 1 is accepted

Sort by
0
Mark Freedman
Top achievements
Rank 1
answered on 22 Oct 2012, 05:30 PM
I use this to toggle opening and closing a window on a button click:

var win = $("#myWindow").data("kendoWindow");

if ($("#myWindow").is(":visible")) {
win.close();
} else {
win.open();
}
Tags
Window
Asked by
Hugo
Top achievements
Rank 1
Answers by
Mark Freedman
Top achievements
Rank 1
Share this question
or