jquery-ui/tests/unit/menu/menu_test_helpers.js
2011-08-03 21:15:38 -04:00

15 lines
336 B
JavaScript

function menu_log( message, clear ) {
if ( clear ) {
$( "#log" ).empty();
}
if ( message === undefined ) {
message = $( "#log" ).data( "lastItem" );
}
$( "#log" ).prepend( message + "," );
}
function menu_click( menu, item ) {
$( "#log" ).data( "lastItem", item );
menu.find( "li:eq(" + item + ") a" ).trigger( "click" );
}