Difference between revisions of "Demo homepage"

From evidyaloka
Jump to: navigation, search
Line 7: Line 7:
 
<nowiki>
 
<nowiki>
 
<code>
 
<code>
var dropdownInput = new OO.ui.DropdownInputWidget( {
+
var dropDown = new OO.ui.DropdownWidget( {
    options: [
+
label: 'Dropdown menu: Select one option',
        { data: 'a', label: 'First' },
+
// The menu is composed within the DropdownWidget
        { data: 'b', label: 'Second', disabled: true },
+
menu: {
        { optgroup: 'Group label' },
+
items: [
        { data: 'c', label: 'First sub-item)' }
+
new OO.ui.MenuOptionWidget( {
    ]
+
data: 'a',
} );
+
label: 'First'
$( document.body ).append( dropdownInput.$element );
+
} ),
 +
new OO.ui.MenuOptionWidget( {
 +
data: 'b',
 +
label: 'Second (disabled option)',
 +
disabled: true
 +
} ),
 +
new OO.ui.MenuOptionWidget( {
 +
data: 'c',
 +
label: 'Third'
 +
} ),
 +
new OO.ui.MenuOptionWidget( {
 +
data: 'd',
 +
label: 'The fourth option has a long label'
 +
} ),
 +
new OO.ui.MenuOptionWidget( {
 +
data: 'e',
 +
label: 'Fifth'
 +
} )
 +
]
 +
}
 +
} ),
 
</code>
 
</code>
 
</nowiki>
 
</nowiki>

Revision as of 04:10, 22 December 2022

Evidyaloka Welcomes you!!