Projet

Général

Profil

Paste
Télécharger (1,25 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / colorbox / styles / plain / colorbox_style.js @ 91f42c9e

1
(function ($) {
2

    
3
Drupal.behaviors.initColorboxPlainStyle = {
4
  attach: function (context, settings) {
5
    $(context).bind('cbox_complete', function () {
6
      // Make all the controls invisible.
7
      $('#cboxCurrent, #cboxSlideshow, #cboxPrevious, #cboxNext', context).addClass('element-invisible');
8
      // Replace "Close" with "×" and show.
9
      $('#cboxClose', context).html('\327').addClass('cbox-close-plain');
10
      // Hide empty title.
11
      if ($('#cboxTitle:empty', context).length == true) {
12
        $('#cboxTitle', context).hide();
13
      }
14
      $('#cboxLoadedContent', context).bind('mouseover', function () {
15
        $('#cboxClose', context).animate({opacity: 1}, {queue: false, duration: "fast"});
16
        if ($('#cboxTitle:empty', context).length == false) {
17
          $('#cboxTitle', context).slideDown();
18
        }
19
      });
20
      $('#cboxOverlay', context).bind('mouseover', function () {
21
        $('#cboxClose', context).animate({opacity: 0}, {queue: false, duration: "fast"});
22
        if ($('#cboxTitle:empty', context).length == false) {
23
          $('#cboxTitle', context).slideUp();
24
        }
25
      });
26
    });
27
    $(context).bind('cbox_closed', function () {
28
      $('#cboxClose', context).removeClass('cbox-close-plain');
29
    });
30
  }
31
};
32

    
33
})(jQuery);