jquery-ui/tests/unit/menu/menu_test_helpers.js

16 lines
393 B
JavaScript
Raw Normal View History

TestHelpers.menu = {
log: function( message, clear ) {
if ( clear ) {
$( "#log" ).empty();
}
if ( message === undefined ) {
message = $( "#log" ).data( "lastItem" );
}
$( "#log" ).prepend( $.trim( message ) + "," );
},
2011-08-04 01:15:38 +00:00
click: function( menu, item ) {
$( "#log" ).data( "lastItem", item );
menu.children( ":eq(" + item + ")" ).find( "a:first" ).trigger( "click" );
}
};