when you first enable colorbox it should check whether the library is found or it will break js currently on website.

Drupal.behaviors.colorbox = function (context) {
     $('.colorbox').colorbox();
};

to

if (typeof colorbox == 'function' and colorbox != undefined) {
	Drupal.behaviors.colorbox = function (context) {
			$('.colorbox').colorbox();
	};
}

Comments

electblake’s picture

I updated code to use jquery itself, seemed sexier..

if (jQuery().colorbox) {
	Drupal.behaviors.colorbox = function (context) {
			$('.colorbox').colorbox();
	};
}
jdwfly’s picture

nice catch i'll put it in there.

jdwfly’s picture

Status: Active » Fixed

committed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.