Difference between revisions of "Demo homepage"

From evidyaloka
Jump to: navigation, search
Line 6: Line 6:
 
<htmltag tagname="script" type="text/javascript">
 
<htmltag tagname="script" type="text/javascript">
 
<nowiki>
 
<nowiki>
var dropDown = new OO.ui.DropdownWidget( {
+
var comboBox = new OO.ui.ComboBoxWidget( {
label: 'Dropdown menu: Select one option',
+
label: 'ComboBoxWidget',
// The menu is composed within the DropdownWidget
+
 
menu: {
 
menu: {
 
items: [
 
items: [
 
new OO.ui.MenuOptionWidget( {
 
new OO.ui.MenuOptionWidget( {
data: 'a',
+
data: 'Option 1',
label: 'First'
+
label: 'Option One'
 
} ),
 
} ),
new OO.ui.MenuOptionWidget( {
+
new OO.ui.MenuOptionWidget( {  
data: 'b',
+
data: 'Option 2',
label: 'Second (disabled option)',
+
label: 'Option Two'
disabled: true
+
 
} ),
 
} ),
 
new OO.ui.MenuOptionWidget( {
 
new OO.ui.MenuOptionWidget( {
data: 'c',
+
data: 'Option 3',
label: 'Third'
+
label: 'Option Three'
 
} ),
 
} ),
new OO.ui.MenuOptionWidget( {
+
new OO.ui.MenuOptionWidget( {  
data: 'd',
+
data: 'Option 4',
label: 'The fourth option has a long label'
+
label: 'Option Four'  
 
} ),
 
} ),
 
new OO.ui.MenuOptionWidget( {
 
new OO.ui.MenuOptionWidget( {
data: 'e',
+
data: 'Option 5',  
label: 'Fifth'
+
label: 'Option Five'
 
} )
 
} )
 
]
 
]
 
}
 
}
} ),
+
} );
 +
$( document.body ).append( comboBox.$element );
  
 
</nowiki>
 
</nowiki>

Revision as of 04:12, 22 December 2022

Evidyaloka Welcomes you!!