Difference between revisions of "Demo homepage"
From evidyaloka
Line 8: | Line 8: | ||
<htmltag tagname="script" type="javascript"> | <htmltag tagname="script" type="javascript"> | ||
var dropDown = new OO.ui.DropdownWidget( { | var dropDown = new OO.ui.DropdownWidget( { | ||
− | label: ' | + | label: 'Select Subject', |
− | + | menu: { | |
− | + | ||
items: [ | items: [ | ||
new OO.ui.MenuOptionWidget( { | new OO.ui.MenuOptionWidget( { | ||
− | data: ' | + | data: 'English', |
− | label: ' | + | label: 'English' |
} ), | } ), | ||
− | + | new OO.ui.MenuOptionWidget( { | |
− | data: ' | + | data: 'Science', |
− | label: ' | + | label: 'Science' |
− | + | ||
} ), | } ), | ||
− | + | new OO.ui.MenuOptionWidget( { | |
− | + | data: 'Maths', | |
− | + | label: 'Maths' | |
− | + | } ), | |
− | + | ] | |
− | + | } | |
− | + | } ), | |
− | + | itemSelected = function(){ | |
− | + | ||
console.log( 'item selected' ); | console.log( 'item selected' ); | ||
}; | }; | ||
− | |||
$( document.body ).append( dropDown.$element ); | $( document.body ).append( dropDown.$element ); | ||
dropDown.getMenu().on('select', itemSelected); | dropDown.getMenu().on('select', itemSelected); | ||
+ | |||
</htmltag> | </htmltag> |
Revision as of 06:45, 22 December 2022
Evidyaloka Welcomes you!!