itemSrc is undefined in some cases
  • I'm working on a site that seems to crash IE7 sometimes, and, while I'm not 100% certain prettyPhoto has anything to do with it, I do think it's likely. While testing the site I found a different bug in the script (which manifests itself in Firefox too).

    Basically, if you try to navigate the lightbox thing too quickly (tap the 'right' arrow key quickly a couple of times, this will not work all the time, so try it a couple of times), the itemSrc value that gets passed to _getFileType() becomes undefined, which causes an error in the browser console (in Firefox it keeps looping the same error message, IE just throws one error (it doesn't crash, so it's not the crashing bug I was looking for).

    I was just wondering if there's a workaround for this.
  • I have the same problem whilst trying to combine prettyPhoto with two other jquery plugins. My setup is within a jquery tools scrollable and using pikachoose to generate the thumbnails that when clicked should activate prettyPhoto. Complicated I know.

    The code in the prettyPhoto .js file line 55 of the compressed version is generating an "itemSrc undefined" error on a loop in Firebug's error console.

    Could it be an incompatible version of jquery doing this? I am using 1.1.2.
  • Correction:
    I am using version v1.3.2 of jquery as loaded by jquerytools: (http://cdn.jquerytools.org/1.1.2/full/jquery.tools.min.js)
    sorry!
  • Hi,

    funny that I just had the same problem.

    In my case the problem is in line 131 of the uncompressed version. It builds up a wrong selector.

    Old code: $('a[rel*='+theGallery+']').each(function(i){
    New code: $("a[rel*='"+theGallery+"']").each(function(i){

    - Lars
  • hm,

    plugins should always use jQuery instead of $... Else they are not compatible with jQuery.noConflict()

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Login with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter