mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-12-07 06:14:24 +00:00
32 lines
480 B
JavaScript
32 lines
480 B
JavaScript
(function() {
|
|
|
|
var lastItem,
|
|
log = [];
|
|
|
|
TestHelpers.menu = {
|
|
log: function( message, clear ) {
|
|
if ( clear ) {
|
|
log.length = 0;
|
|
}
|
|
if ( message === undefined ) {
|
|
message = lastItem;
|
|
}
|
|
log.push( $.trim( message ) );
|
|
},
|
|
|
|
logOutput: function() {
|
|
return log.join( "," );
|
|
},
|
|
|
|
clearLog: function() {
|
|
log.length = 0;
|
|
},
|
|
|
|
click: function( menu, item ) {
|
|
lastItem = item;
|
|
menu.children( ":eq(" + item + ")" ).find( "a:first" ).trigger( "click" );
|
|
}
|
|
};
|
|
|
|
})();
|