views:

145

answers:

1

Hi,

I am using this plugin for my new site:

http://colorpowered.com/colorbox/

The page in concern has two hyper links which are of the same class:

a.emailQuote

These both should open the same colorbox window which is done by the following code:

    $("a.emailQuote").colorbox({
    transistion:"fade",
    title:true,
    iframe:true,
    scrolling:false,
    close:"Close this window",
    innerWidth:478,
    innerHeight:507,
    initialWidth:478,
    initialHeight:507       
});

however when the colorbox window opens it seems to register that there are two windows so displays the previous, next arrows and the text that says this is image one of two.

I was wondering if there was a way to fix this without hiding these elements with CSS.

+1  A: 

Colorbox is probably assuming that since your selector returned two links, that they are related. "It's a feature". You should apply colorbox separately to each link, or maybe look into a different lightbox implementation.

Jonathan Julian
As i thought. I tried to differentiate the links to no avail.Have just thrown them off screen for now with CSS.
RyanP13
Select them using their ids: `$("a#emailQuote1").colorbox...` and `$("a#emailQuote2").colorbox...`. You'll want to DRY up the colorbox config, but at least you'll have two separate instances.
Jonathan Julian