Révision b433176d
Ajouté par Assos Assos il y a environ 4 ans
drupal7/sites/all/modules/colorbox/js/colorbox.js | ||
---|---|---|
7 | 7 |
|
8 | 8 |
Drupal.behaviors.initColorbox = { |
9 | 9 |
attach: function (context, settings) { |
10 |
if (!$.isFunction($.colorbox) || typeof settings.colorbox === 'undefined') { |
|
10 |
if (!$.isFunction($('a, area, input', context).colorbox) || typeof settings.colorbox === 'undefined') {
|
|
11 | 11 |
return; |
12 | 12 |
} |
13 | 13 |
|
... | ... | |
30 | 30 |
}; |
31 | 31 |
|
32 | 32 |
$('.colorbox', context) |
33 |
.once('init-colorbox') |
|
34 |
.colorbox(settings.colorbox); |
|
33 |
.once('init-colorbox').each(function(){ |
|
34 |
$(this).colorbox(settings.colorbox); |
|
35 |
}); |
|
35 | 36 |
|
36 | 37 |
$(context).bind('cbox_complete', function () { |
37 | 38 |
Drupal.attachBehaviors('#cboxLoadedContent'); |
Formats disponibles : Unified diff
Weekly update of contrib modules