WordPress.org

Forums

jQuery Colorbox
[resolved] $linkClasses is undefined (4 posts)

  1. suksuk.lee
    Member
    Posted 4 years ago #

    I am using version 4.0 of the jQuery plugin but am getting this error:

    $linkClasses is undefined on this line:
    colorboxGroupId = $linkClasses.match(COLORBOX_CLASS_MATCH) || $linkClasses.match(COLORBOX_MANUAL);

    Link to a sample page

    Thanks in advance.

  2. techotronic
    Member
    Plugin Author

    Posted 4 years ago #

    Hi,

    is there a reason you are using jQuery 1.6 instead of version 1.4.4 that comes bundled with WordPress 3.1?

    I use the .attr() method quite often, and in jQuery 1.6, they changed the method so it returns undefined instead of an empty string if the requested attribute is not present...

    I'll try to fix all calls to .attr() in the plugin's JavaScript code, until then you'll have to downgrade to at least jQuery 1.5.

    Cheers,
    Arne

    Link to jQuery API ".attr()"

  3. suksuk.lee
    Member
    Posted 4 years ago #

    Hi Arne,

    I thought it might be related to that. To be honest I have no idea where jQuery 1.6 is coming from! If I find out, I will let you know and will downgrade to an older version.

    Thanks very much.

    Edit: Found the 'culprit' - jQuery lazy load was loading 1.6.1 - will disable this plugin for now. Thanks again for your time!

  4. techotronic
    Member
    Plugin Author

    Posted 4 years ago #

    Hi,

    I fixed the JavaScript and just tested it successfully with jQuery 1.6. It's available in the current development version:

    http://downloads.wordpress.org/plugin/jquery-colorbox.zip

    Cheers,
    Arne

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • jQuery Colorbox
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic