Treehouse: Grow your CSS skills. Land your dream job.

event.layerX not working in Webkit

  • # January 6, 2012 at 10:01 am

    This is the error message I get in Chrome developer tools when I try to click on the thumbnails on the bottom right of this page.

    “event.layerX and event.layerY are broken and deprecated in WebKit.”

    Is this something I need to fix in a javascript file?


    # January 6, 2012 at 10:23 am

    Hi Aaronheine!

    It’s actually not an error, it’s a warning message. It’s because jQuery 1.6 references the event.layerX and event.layerY. Upgrade to jQuery 1.7 and the warning message will disappear.

    # January 6, 2012 at 10:32 am


    Do you know why when I click those thumbnails the full size image is not popping up?

    # January 6, 2012 at 10:51 am

    I’m not sure what thumbnails you mean. But I do see an error on the page:

    a is undefined
    function Lg(a){a=a.f[1];return a!=j?a:…);function gh(a){a[Dc]&&a[Dc][gc](a)}
    main.js (line 30)

    This error may be causing whatever other functions to stop working.

    # January 10, 2012 at 11:57 am

    The thumbnails are in the bottom right corner. They are blueprints.

    You see they are links, but they are not working.

    Could the javascript above be saying that those anchor links are not defined?

    # January 10, 2012 at 4:03 pm

    The problem with the thumbnails is in this file. Here is the code:

    var t = jQuery(this).find('.wpcart_gallery .thickbox');
    maxWidth :'90%',
    maxHeight :'90%',
    returnFocus : false

    var that = jQuery(this);
    if (jQuery(this).attr('href') == that.attr('href')) {

    It is only targeting the “thickbox” class inside of the “imagecol” div. Which DOES NOT contain the “.wpcart_gallery .thickbox” link/image.

    Honestly, I’m not sure what the second function is trying to do, but just using code like this should work:

    maxWidth :'90%',
    maxHeight :'90%',
    returnFocus : false
    # January 10, 2012 at 4:43 pm

    I have that code in but looks like there is no change.

    Want to take one more look?

    # January 10, 2012 at 5:27 pm

    Oh, the thumb links have a misspelling… I see “rev” instead of “rel” for the URL.

    And oddly the main image doesn’t open when you click on it, so maybe try using a window load instead of a document ready:

    maxWidth :'90%',
    maxHeight :'90%',
    returnFocus : false
    # January 11, 2012 at 11:51 am
    Says “rel” is not used by the browers in any way.

    I tried the window load.

    # January 11, 2012 at 4:20 pm

    Yes, I know, but I think colorbox uses the rel tag.

Viewing 10 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic.