EasyUI Forum
May 16, 2024, 11:13:50 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Hide Window without Closing  (Read 2599 times)
sky-t
Full Member
***
Posts: 145


View Profile
« on: February 07, 2020, 02:26:30 AM »

Hi there,

is there a chance to completely hide a window (incl. title) without closing is (so i can show it again if needed)?
Logged
jarry
Administrator
Hero Member
*****
Posts: 2264


View Profile Email
« Reply #1 on: February 11, 2020, 08:56:46 PM »

Please extend 'show' and 'hide' methods for the window component.
Code:
$.extend($.fn.window.methods, {
hide: function(jq){
return jq.each(function(){
var w = $(this);
var state = w.data('window');
state.window.hide();
if (state.shadow){state.shadow.hide();}
if (state.mask){state.mask.hide();}
})
},
show: function(jq){
return jq.each(function(){
var w = $(this);
var state = w.data('window');
state.window.show();
if (state.shadow){state.shadow.show();}
if (state.mask){state.mask.show();}
})
}
})

Usage examples.
Code:
$('#w').window('show');  // display the window
$('#w').window('hide');   // hide the window without closing it
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!