YUI3 Panel background shading and position problems

|
| By Webner

By default YUI3 assigns yui3-widget-mask class for background shading. To override that we need to change its style properties. Similarly for position of the panel, it can be changed by specifying position property of .yui3-panel class. These are the methods to accomplish this:

Y.one(‘.yui3-widget-mask’).setStyle(‘background’,’#fff’); 
Y.one(‘.yui3-panel’).setStyle(‘position’,’fixed’); 
Full code is like this:
YUI().use(‘panel’, function(Y) {
EX_waitPanel = new Y.Panel( {
srcNode : ‘#plswait’,
width : “240px”,
centered : true,
close : false,
draggable : false,
modal : true,
bodyContent : waitImg,
headerContent : waitMsg
});             
EX_waitPanel.render(document.body);
Y.one(‘.yui3-widget-mask’).setStyle(‘background’,’#fff’); 
Y.one(‘.yui3-panel’).setStyle(‘position’,’fixed’); 

Leave a Reply

Your email address will not be published. Required fields are marked *