var opts = $('#w').window('options');if (opts.closed){ console.log('The window is closed');} else { console.log('The window is open');}