1 2 3 4 5 6 7 8 9 10 11 12 13 14
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.children( ":eq(" + item + ")" ).find( "a:first" ).trigger( "click" ); }