mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
16 lines
393 B
JavaScript
16 lines
393 B
JavaScript
TestHelpers.menu = {
|
|
log: function( message, clear ) {
|
|
if ( clear ) {
|
|
$( "#log" ).empty();
|
|
}
|
|
if ( message === undefined ) {
|
|
message = $( "#log" ).data( "lastItem" );
|
|
}
|
|
$( "#log" ).prepend( $.trim( message ) + "," );
|
|
},
|
|
|
|
click: function( menu, item ) {
|
|
$( "#log" ).data( "lastItem", item );
|
|
menu.children( ":eq(" + item + ")" ).find( "a:first" ).trigger( "click" );
|
|
}
|
|
}; |