Commit 00bb9271 authored by s_leu's avatar s_leu Committed by frjo
Browse files

Issue #1429784 by s_leu, mgifford, digitaldonkey: Use data attribute instead...

Issue #1429784 by s_leu, mgifford, digitaldonkey: Use data attribute instead of rel to be HTML5 valid
parent ba54ec96
......@@ -171,6 +171,6 @@ function template_preprocess_colorbox_formatter(&$variables) {
}
$variables['attributes']['title'] = $caption;
$variables['attributes']['rel'] = $gallery_id;
$variables['attributes']['data-colorbox-gallery'] = $gallery_id;
$variables['attributes']['class'] = $classes_array;
}
......@@ -16,6 +16,10 @@
}
}
settings.colorbox.rel = function () {
return $(this).data('colorbox-gallery')
};
$('.colorbox', context)
.once('init-colorbox')
.colorbox(settings.colorbox);
......
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