Jump to content

Widget:GenderSelector

From RiskiPedia
Revision as of 23:06, 30 January 2025 by User (talk | contribs) (Created page with "<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 ); <...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

<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>