I want close window when press esc, how can i do that?
1 Answer, 1 is accepted
0
Alex Gyoshev
Telerik team
answered on 28 Dec 2010, 03:16 PM
Hello Phat,
You can do so by attaching a keydown event handler and closing the window using its close() client-side method:
$(document).keydown(function(e) {
if (e.keyCode == 27) // esc
$('#Window1').data('tWindow').close();
})
Greetings,
Alex Gyoshev
the Telerik team
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Public Issue Tracking
system and vote to affect the priority of the items