Skip to content

Instantly share code, notes, and snippets.

@paulallies
Created September 2, 2011 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paulallies/1189544 to your computer and use it in GitHub Desktop.
Save paulallies/1189544 to your computer and use it in GitHub Desktop.
Modal
requires: yui2-container
//declaration
var YAHOO = Y.YUI2;
var myPopup = function (modalElement) {
//create a locally scoped YUI panel
var modal = new YAHOO.widget.Panel(modalElement, {
fixedcenter: true,
visible: false,
modal: true,
close: false,
underlay: 'none'
});
//Show method of this object
this.show = function () {
modal.show();
};
//Hide method of this object
this.hide = function () {
modal.hide();
}
};
var newPopup = new myPopup("mywmodal");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment