Commit 6759e1e4 authored by frjo's avatar frjo

Use "data-colorbox-gallery" if set otherwise use "rel".

parent a1f60a27
......@@ -14,8 +14,14 @@ Drupal.behaviors.initColorbox = {
}
}
// Use "data-colorbox-gallery" if set otherwise use "rel".
settings.colorbox.rel = function () {
return $(this).data('colorbox-gallery')
if ($(this).data('colorbox-gallery')) {
return $(this).data('colorbox-gallery');
}
else {
return $(this).attr('rel');
}
};
$('.colorbox', context)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment