Solution for PrettyPhoto Error: Object doesn’t support this property or method jquery-1.6.1.min.js, line xx character xxxxx

headmaster @ 12:31 am

This is an issue using PrettyPhoto on a WordPress blog for IE7/IE8

JQuery LogoI am using a JavaScript lightbox named PrettyPhoto which utilizes the JQuery framework. The lightbox works fine in Mozilla Firefox and Google Chrome but lately we noted it wasn’t working consistently in IE8 or IE7. The JavaScript console on IE’s developer tools give the following error:

Object doesn’t support this property or method jquery-1.6.1.min.js, line xx character xxxxx

The solution follows…

The issue in detail

I use PrettyPhoto in several posts throughout my site as well as other plug-ins.

Using IE8 and going through my blog as a user would, if I came across an image which used the PrettyPhoto plug-in everything would work as expected. Everything was fine except under certain conditions which took me a while to isolate.

It caused me grief to no end for days. The reason for my inability to properly identify the issue was twofold.

  1. I was using tabbed browsing and failed to realize that for some reason the error was crashing some of the functionality of the browser instance which loaded the script so that going back to a post which had previously worked no longer did anything; even after loading other tabs.
  2. I thought the problem was with the lightbox itself as everything else worked as usual and from a cursory perspective the issue seemed to appear at random.

It seemed the lighbox script never loaded completely and all functionality on the page failed. The page displayed correctly but nothing was clickable afterwards. Instead of opening in a lightbox the image would just open in the current page (_self.) If I went back to a previous post using the browser’s back button, previously viewed posts (in the current session) which had been proven to work no longer did.

Trouble Shooting

I didn’t want to get rid of the lightbox plug-in as I like its ease of use so I downloaded and installed the latest version.


The obvious thing to do here is start disabling plug-ins.

A final look through the posts to see if I was overlooking something yielded the key. I noticed that if I started navigating the site from certain pages everything was fine till I came upon those posts where a syntax highlighting plug-in was also present. What made the condition hard to isolate was that once the error occurred in one page the browser would stop processing JavaScript but gave no indication other than not processing the previously viewed pages.

Closer inspection using the IE developer tools yielded a call from SyntaxHighlighter for the JQery version installed on the system. This however, was not my primary suspect.

The first suspect was a related links plugin I’ve been experimenting with.

No luck… Enabled the plug-in again.

Since the SyntaxHighlighter plug-in was already in my radar I disabled it.

Success, it was the SyntaxHighlighter which was somehow conflicting with my lightbox.


After much back n forth it became clear that when the plug-in crashed the browser instance itself, not just the current tab but all of the tabs loaded in a particular browser instance would no longer run scripts. If I spawned another window, not a tab but a window (as a new process thread). That browser window would function perfectly until I attempted to view lightboxed images in the culprit postings again.

There’s also this: The lighboxex were previously confirmed to work. In the last few weeks there was an update for SyntaxHighlighter which we did through the WP admin automatic update utility. We didn’t go back to check the postings as there was no overt indication of a problem. So it is quite probable that the last update to the plug-in introduced the issue.

I decided to go to the plug-in creator’s page to look for any kind of solution or at least make some kind of a report to the plug-in developer. Unfortunately for me I visited his page using IE 8 (since I was already working with it) and fell victim to some kind of rancid script on his webpage that attempts to keep you from leaving. Or at least that’s what I though was happening for IE promptly froze and eventually crashed.

Final Solution

Out with SyntaxHighlighter!

Haven’t looked back!

Ajax CSS CSS gradients CSS rounded corners CSS Style Sheets CSS Transparency error Failed Evaluations footer header image gallery JavaScript javaScript JavaScript Errors jQuery jquery Lightbox light box links open source PHP PHP PHP scripts Pretty Photo prettyPhoto Programming Languages Script Evaluations Search Engine Optimization StatusNet StatusNet themes templates themes Useful CSS Code Useful WordPress Code Web Applications Web Design Web Development Webmaster Toolbelt WordPress wordpress Word Press WordPress 3.3.2 word press links WordPress Plugins wordpress theme
  • Digital Goodies