colorbox_style.js 646 B

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