Created
September 2, 2011 19:09
-
-
Save paulallies/1189544 to your computer and use it in GitHub Desktop.
Modal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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