JavaScript Window

Set the keyboardCloseKey property of the jqxWindow. Author: http://jqwidgets.com

by jqwidgets

HTML

<link rel="stylesheet" href="https://jqwidgets.com/public/jqwidgets/styles/jqx.base.css">
<script src="https://jqwidgets.com/public/jqwidgets/jqx-all.js"></script>
<link rel="stylesheet" href="https://jqwidgets.com/public/jqwidgets/styles/jqx.energyblue.css">
Press "Space" to close the window
<div id='jqxwindow'>
    <div>Header</div>
    <div>Content</div>
</div>

JavaScript

$("#jqxwindow").jqxWindow({
    height: 100,
    width: 300,
    theme: 'energyblue',
    keyboardCloseKey: 32
});
$('#jqxwindow').jqxWindow('focus');