the-petrolhead
the-petrolhead

Reputation: 617

How to create a Modality Mask in YUI2?

I want to know how a modality mask can be created in YUI2 without using a configuration attribute. While rendering a YUI Panel, the mask normally renders before the panel is displayed. I want to do this in order to resolve a cross browser compatibility issue.

Can anyone share a snippet for this?

Upvotes: 1

Views: 59

Answers (1)

the-petrolhead
the-petrolhead

Reputation: 617

Just figured out a way to do this.

YUI container.js has various functions to deal with masks.

buildMask()
sizeMask()
showMask()/hideMask()

The only difference is I need to call them manually like below -

var panel = new YAHOO.widget.Panel('nodeId', configs);
...
panel.buildMask();
panel.sizeMask();
panel.bringToTop();
panel.showMask();
...
panel.render();

Upvotes: 1

Related Questions