Projet

Général

Profil

Paste
Télécharger (693 octets) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / colorbox / styles / stockholmsyndrome / colorbox_style.js @ b433176d

1
/**
2
 * @file
3
 * Colorbox module style js.
4
 */
5

    
6
(function ($) {
7

    
8
Drupal.behaviors.initColorboxStockholmsyndromeStyle = {
9
  attach: function (context, settings) {
10
    $(context).bind('cbox_open', function () {
11
      // Hide close button initially.
12
      $('#cboxClose', context).css('opacity', 0);
13
    });
14
    $(context).bind('cbox_load', function () {
15
      // Hide close button. (It doesn't handle the load animation well.)
16
      $('#cboxClose', context).css('opacity', 0);
17
    });
18
    $(context).bind('cbox_complete', function () {
19
      // Show close button with a delay.
20
      $('#cboxClose', context).fadeTo('fast', 0, function () {$(this).css('opacity', 1)});
21
    });
22
  }
23
};
24

    
25
})(jQuery);