Search code examples
javascriptajaxcolorboxright-click

Duplicate the right click lightbox action, like on github.com


I'm trying to duplicate the action of right clicking a logo to activate a lightbox (using Colorbox's inline capability)

This works with normal left click:

<h1 class="logo d1"><a href="#inline_content" class="inline"><?php bloginfo('name'); ?></a></h1>

What I'm trying to do is:

        <h1 class="logo d1"><a href="<?php get_home_url(); ?>" class="inline"><?php bloginfo('name'); ?></a></h1>

With the right click (possibly) changing the href to #inline_content?

I'm somewhat new to javascript, maybe I'm going about it the wrong way?


Solution

  • if you add { open: true } to the colorbox statement, it seems to work :)