Working on a restaurant website recently I wanted to be able to click to view menus in an overlay. After some experimentation I settled on using an enclosing short code.

The code in functions.php looks like this:

function menu_shortcode( $atts, $content = null ) {
	$menu = get_the_ID();
	return 
		'<a href="#'.$menu.'" class="fancybox-inline">
			<img src="SUITABLE_MENU_ICON" />
		</a>
		<div class="menuwrap">
		<div class="menubox" id="'.$menu.'">' . $content . '</div>
		</div>';
}
add_shortcode( 'menu', 'menu_shortcode' );

The menuwrap div is set to display:none. It’s important that the each menubox div has an unique id.