Commit 93baf9b5 authored by frjo's avatar frjo
Browse files

Issue #1910162 by jrp: Patch by frjo that change the jQuery selector to not...

Issue #1910162 by jrp: Patch by frjo that change the jQuery selector to not use filter(). Just using the class as a selector is a lot faster, especially for js performance deficient browsers like IE 7.
parent ca6145d4
......@@ -5,8 +5,7 @@ Drupal.behaviors.initColorbox = {
if (!$.isFunction($.colorbox)) {
return;
}
$('a, area, input', context)
.filter('.colorbox')
$('.colorbox', context)
.once('init-colorbox')
.colorbox(settings.colorbox);
}
......
......@@ -15,7 +15,7 @@ Drupal.behaviors.initColorboxInline = {
if (!results) { return ''; }
return results[1] || '';
};
$('a, area, input', context).filter('.colorbox-inline').once('init-colorbox-inline').colorbox({
$('.colorbox-inline', context).once('init-colorbox-inline').colorbox({
transition:settings.colorbox.transition,
speed:settings.colorbox.speed,
opacity:settings.colorbox.opacity,
......
......@@ -31,8 +31,7 @@ Drupal.behaviors.initColorboxLoad = {
}
return p;
};
$('a, area, input', context)
.filter('.colorbox-load')
$('.colorbox-load', context)
.once('init-colorbox-load', function () {
var params = $.urlParams($(this).attr('href'));
$(this).colorbox($.extend({}, settings.colorbox, params));
......
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