Difference between revisions of "Demo homepage"

From evidyaloka
Jump to: navigation, search
Line 6: Line 6:
 
</div>
 
</div>
  
<htmltag tagname="script" type="javascript">
+
 
 
var dropDown = new OO.ui.DropdownWidget( {
 
var dropDown = new OO.ui.DropdownWidget( {
 
label: 'Select Subject',
 
label: 'Select Subject',
Line 33: Line 33:
  
 
dropDown.getMenu().on('select', itemSelected);
 
dropDown.getMenu().on('select', itemSelected);
</htmltag>
 

Revision as of 07:58, 22 December 2022

Evidyaloka Welcomes you!!


var dropDown = new OO.ui.DropdownWidget( { label: 'Select Subject',

               menu: {

items: [ new OO.ui.MenuOptionWidget( { data: 'English', label: 'English' } ),

                               new OO.ui.MenuOptionWidget( {

data: 'Science', label: 'Science' } ),

                               new OO.ui.MenuOptionWidget( {

data: 'Maths', label: 'Maths' } ),

                            ]

} } ), itemSelected = function(){ console.log( 'item selected' ); };

$( document.body ).append( dropDown.$element );

dropDown.getMenu().on('select', itemSelected);