Title: $linkClasses is undefined
Last modified: August 20, 2016

---

# $linkClasses is undefined

 *  Resolved [suksuk.lee](https://wordpress.org/support/users/suksuklee/)
 * (@suksuklee)
 * [15 years ago](https://wordpress.org/support/topic/linkclasses-is-undefined/)
 * 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](http://bit.ly/bvtOny)
 * Thanks in advance.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [techotronic](https://wordpress.org/support/users/techotronic/)
 * (@techotronic)
 * [15 years ago](https://wordpress.org/support/topic/linkclasses-is-undefined/#post-2104379)
 * 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()”](http://api.jquery.com/attr)
 *  Thread Starter [suksuk.lee](https://wordpress.org/support/users/suksuklee/)
 * (@suksuklee)
 * [15 years ago](https://wordpress.org/support/topic/linkclasses-is-undefined/#post-2104457)
 * 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!
 *  Plugin Contributor [techotronic](https://wordpress.org/support/users/techotronic/)
 * (@techotronic)
 * [15 years ago](https://wordpress.org/support/topic/linkclasses-is-undefined/#post-2104558)
 * 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](http://downloads.wordpress.org/plugin/jquery-colorbox.zip)
 * Cheers,
    Arne

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘$linkClasses is undefined’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/jquery-colorbox_848c98.svg)
 * [jQuery Colorbox](https://wordpress.org/plugins/jquery-colorbox/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/jquery-colorbox/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/jquery-colorbox/)
 * [Active Topics](https://wordpress.org/support/plugin/jquery-colorbox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/jquery-colorbox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/jquery-colorbox/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [techotronic](https://wordpress.org/support/users/techotronic/)
 * Last activity: [15 years ago](https://wordpress.org/support/topic/linkclasses-is-undefined/#post-2104558)
 * Status: resolved