2

I recently aquired an old website (we're talking tables, image maps, you name it).

I was asked to make an old link to a Flash gallery into a lightbox. I simply used a javascript: openLightbox() on the gallery link (top right corner). I know, I know, but it doesn't seem out of place on this site.

Anyway, I also include a JavaScript file scripts.js, which

  • Includes jQuery and CSS files for fancybox.
  • Use AJAX to get some JSON of image filenames
  • Create a hidden unordered list on the page with links to the images from JSON
  • Attach the fancybox method to these images

Then, on the openLightbox() I simply call the click() function on the first link.

Nice and easy, I thought. It worked like a charm in Firefox. Then my arch nemesis decided it didn't want to play ball. That's IE7/8.

I've had the IE8 Developer Tools out for a while but haven't been able to figure it out. The only error I'm getting is "v is null or not an object" which is referencing the minified/packed jQuery code on Google's CDN. Obviously that's not the problem, so does anyone have any idea what is wrong here?

Here is a link to the page: http://edgewaterterraces.com.au/

Also...

Thank you very much for your time.

UPDATE

Wow, it seems to work on this page. What gives?

alex
  • 479,566
  • 201
  • 878
  • 984
  • I suggest you use an unminified version of jQuery while developing - it'll help you debug better – K Prime Feb 11 '10 at 01:36

1 Answers1

2

You are embedding both jquery and script.js twice on the front page.

Once in line 12, once in line 27.

Pekka
  • 442,112
  • 142
  • 972
  • 1,088
  • Ah! There was a tonne of HTML files, so I wrote a PHP script to insert jQuery into all of them. Must of accidentally ran it twice. Thanks! – alex Feb 11 '10 at 01:38