The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Programming Fundamentals" Dec 02 - 2:00 PM Eastern

Context Menu Links

  • # March 11, 2010 at 4:56 pm

    I am creating my own contextual menu for trial purposes.

    Here is my code:


    function ViewSource() {“view-source:” + window.location, ”, ‘status=0,toolbar=0,menubar=1,location=0’) }

    function newTab() {, ”, ”);

    <li><a href="javascript:history.go(-1)">Back</a></li>
    <li><a href="javascript:history.go(1)">Foward</a></li>
    <li><a href="javascript:window.stop()">Stop</a>
    <li class="section-bottom"><a href="javascript:window.location.reload(false)">Reload</a></li>
    <li class="section-middle"></li>
    <li class="section-top"><a href="javascript:window.print()">Print</a></li>
    <li><a href="javascript:ViewSource()">View Source</a></li>
    <li><a href="javascript:newTab()">Open Page In New Tab</a></li>

    But I am looking to create buttons like Save (CTRL+S), Select All (CTRL+A), Copy (CTRL+C), Cut (CTRL+X), Paste (CTRL+P) and Bookmark (CTRL+D).

    Can be jQuery or javascript, but not to many lines.

    Copying I have looked into zeroClipboard, and toying around, but I if could gain a function using ctrl+letter that would be better.

    A demo would be right clicking, that’s the context menu.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed