Difference between revisions of "Demo homepage"

From evidyaloka
Jump to: navigation, search
Line 7: Line 7:
  
 
<htmltag tagname="script" type="javascript">
 
<htmltag tagname="script" type="javascript">
{{Drop down list|Name=[[WP:TW|TW]]|id=Twinkle}}
+
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);
 
</htmltag>
 
</htmltag>

Revision as of 08:10, 22 December 2022

Evidyaloka Welcomes you!!