Widget:GenderSelector
Appearance
<Script lang="javascript">
var HelloWorld = {
init: function () {
// Create a button using OOUI // Note! OOUI is being replaced by Codex var button = new OO.ui.ButtonWidget( { label: 'Click me!' } );
// Bind events button.on( 'click', HelloWorld.sayHello );
// Add the button to the DOM $( '.hello-world' ).html( button.$element ); },
sayHello: function () { alert( 'Hello world!' ); } };
mw.loader.using( [ 'oojs-ui-core' ], HelloWorld.init );
</script>