setTimeout(function() {
links = menu.find("li.ui-menu-item a");
- button.simulate( "click" );
+ button.trigger( "click" );
menu.find( "a" ).last().simulate( "mouseover" ).trigger( "click" );
equal(
menu.attr( "aria-activedescendant" ),
setTimeout(function() {
links = menu.find( "li.ui-menu-item a" );
// open menu and click first item
- button.simulate( "click" );
+ button.trigger( "click" );
links.first().simulate( "mouseover" ).trigger( "click" );
// open menu again and hover item
- button.simulate( "click" );
+ button.trigger( "click" );
links.eq( 3 ).simulate( "mouseover" );
// close and use keyboard control on button
button.simulate( "keydown", { keyCode: $.ui.keyCode.ESCAPE } );
button.simulate( "focus" );
setTimeout(function() {
- button.simulate( "click" );
- menu.find( "a" ).eq( optionIndex ).simulate( "mouseover" ).simulate( "click" );
+ button.trigger( "click" );
+ menu.find( "a" ).eq( optionIndex ).simulate( "mouseover" ).trigger( "click" );
start();
}, 1 );
});
this.element.selectmenu( "open" ).selectmenu( "close" );
this.element.selectmenu( "open" );
- $( "body" ).simulate( "click" );
+ $( "body" ).trigger( "click" );
});
setTimeout(function() {
button.simulate( "keydown", { keyCode: $.ui.keyCode.DOWN } );
- button.simulate( "click" );
+ button.trigger( "click" );
links = menu.find( "li.ui-menu-item a" );
optionIndex = 0;
links.eq( optionIndex ).simulate( "mouseover" );
button.simulate( "focus" );
setTimeout(function() {
- button.simulate( "click" );
- menu.find( "a" ).eq( optionIndex ).simulate( "mouseover" ).simulate( "click" );
+ button.trigger( "click" );
+ menu.find( "a" ).eq( optionIndex ).simulate( "mouseover" ).trigger( "click" );
start();
}, 1 );
});