})
.autocomplete( "instance" )._renderItem = function( ul, item ) {
return $( "<li>" )
- .append( "<a>" + item.label + "<br>" + item.desc + "</a>" )
+ .append( "<div>" + item.label + "<br>" + item.desc + "</div>" )
.appendTo( ul );
};
});
event = $.Event( "keydown" );
event.keyCode = $.ui.keyCode.DOWN;
element.trigger( event );
- equal( menu.find( ".ui-menu-item.ui-state-focus" ).length, 1, "menu item is active" );
+ equal( menu.find( ".ui-menu-item-wrapper.ui-state-focus" ).length, 1,
+ "menu item is active" );
event = $.Event( "keydown" );
event.keyCode = $.ui.keyCode.ENTER;
open: function() {
equal(
element.autocomplete( "widget" )
- .children( ".ui-menu-item.ui-state-focus" )
+ .find( ".ui-menu-item-wrapper.ui-state-focus" )
.length,
focusedLength,
"first item is " + (afValue ? "" : "not") + " auto focused" );
},
_renderItem: function( ul, item ) {
- return $( "<li>" ).text( item.label ).appendTo( ul );
+ return $( "<li>" )
+ .append( $( "<div>" ).text( item.label ) )
+ .appendTo( ul );
},
_move: function( direction, event ) {