colorbox_style.js 693 B

12345678910111213141516171819202122232425
  1. /**
  2. * @file
  3. * Colorbox module style js.
  4. */
  5. (function ($) {
  6. Drupal.behaviors.initColorboxStockholmsyndromeStyle = {
  7. attach: function (context, settings) {
  8. $(context).bind('cbox_open', function () {
  9. // Hide close button initially.
  10. $('#cboxClose', context).css('opacity', 0);
  11. });
  12. $(context).bind('cbox_load', function () {
  13. // Hide close button. (It doesn't handle the load animation well.)
  14. $('#cboxClose', context).css('opacity', 0);
  15. });
  16. $(context).bind('cbox_complete', function () {
  17. // Show close button with a delay.
  18. $('#cboxClose', context).fadeTo('fast', 0, function () {$(this).css('opacity', 1)});
  19. });
  20. }
  21. };
  22. })(jQuery);