html5 context menu

by Arturo Soto

HTML

<!--

web:
http://davidwalsh.name/html5-context-menu
-->

<section contextmenu="mymenu">
	<!-- 
		For the purpose of cleanliness, 
		I'll put my menu inside the element that will use it 
	-->
    <h1>html5 context menu</h1>
    
    <menu type="context" id="mymenu">
        <menuitem label="Refresh Post" onclick="window.location.reload();" icon="/images/refresh-icon.png"></menuitem>
        <menuitem label="Skip to Comments" onclick="window.location='#comments';" icon="/images/comment_icon.gif">    </menuitem>
	    <menu label="Share on..." icon="/images/share_icon.gif">
		    <menuitem label="Twitter" icon="/images/twitter_icon.gif" onclick="goTo('//twitter.com/intent/tweet?text=' + document.title + ':  ' + window.location.href);"></menuitem>
		    <menuitem label="Facebook" icon="/images/facebook_icon16x16.gif" onclick="goTo('//facebook.com/sharer/sharer.php?u=' + window.location.href);"></menuitem>
	    </menu>
</menu>
</section>