I just installed lightbox for D6 and am using the default settings. In firebug i'm getting the following 2 errors:

$("a:has(" + classes + ")") has no properties ~ image_nodes.js?E (line 21)

$(document).ready is not a function ~ image_nodes.js?E (line 21)

My links are set up like so:

<a href="/sites/all/themes/ai/images/portfolio/wiki53.jpg" rel="lightbox[cms]"><img src="/sites/all/themes/ai/images/portfolio/wiki53_thumb.jpg" alt="Fifth Third Wiki" class="imgPortfolio" />

Any help on this issue would be greatly appreciated. You can view the site I'm receiving errors on at www.corydorning.net/portfolio

Comments

jarnof’s picture

I have the exact same problem... Images first opens in lightbox then suddenly browser takes me directly to the image. Funny thing is that everything seems to work fine in IE6 (not sure about 7 or 8) But not working on firefox on my macbook

jeffsensat’s picture

Same for me, on a Mac with Firefox 2.0.0.12. Triggering a Lightbox V2-tagged link, I see what seems to be the Lightbox V2 window start to load, which immediately disappears and the IMAGE ONLY appears in the browser window. Hitting the BACK button takes you back to the page on which the Lightbox V2 link appeared.

Oddly, Lightbox V2 seems to work fine with Firefox 3.0 beta 4 and Safari 3.0.4 ...

king2’s picture

change
anchor.onclick = function() { Lightbox.start(this); return false; };
to
anchor.onclick = function() { Lightbox.start(this); window.event.returnValue = false; return false; };

Do the same with other onclick functions.
This helped me.

huayen’s picture

I have same problem under firefox, but it only happens for anonymous user. For authenticated users it works as expected.

For IE, it also works well for both anonymous and authenticated users.

huayen’s picture

Your method not works for me.

kody’s picture

king2: What file are you changing this code in? I can't find your snippets...

Anyone else have a fix? I've got this issue as well.

ncy’s picture

if you have Google Analytics module running, it breaks Lightbox in this way. i dont think they've released a fix yet. if you're not too attached to the module itself, a workaround is to not use the Google Analytics module at all. login to Google Analytics, copy the tracking code, and paste it in a new Block on your site, placed in the Footer region. hope that's helpful ... the only thing is, it will track your admin browsing as well since Footer is on every page.

see for reference http://drupal.org/node/224442

i get the same problem in OSX 10.3.9 running in Safari. does anybody know a fix to that? (even Lokesh's Lightbox homepage doesn't work right). i normally use Firefox and IE7 on Vista, and those run fine. any help appreciated, much thx

huayen’s picture

Use following PHP snippet in block configuration to exclude admin browsing:

<?php
global $user;
if ($user->uid == 1){
  return TRUE;
} else {
  return FALSE;
}
?>
stella’s picture

Status: Active » Closed (duplicate)

Duplicate of #224442.

Solution suggested in comment #3 doesn't work I'm afraid.

Cheers,
Stella