Version 1
[yaffs-website] / web / modules / contrib / video_embed_field / js / video-embed-field.colorbox.js
1 /**
2  * @file
3  * The video_embed_field colorbox integration.
4  */
5
6 (function($) {
7   Drupal.behaviors.video_embed_field_colorbox = {
8     attach: function (context, settings) {
9       $('.video-embed-field-launch-modal', context).once().click(function(e) {
10         // Allow the thumbnail that launches the modal to link to other places
11         // such as video URL, so if the modal is sidestepped things degrade
12         // gracefully.
13         e.preventDefault();
14         $.colorbox($.extend(settings.colorbox, {'html': $(this).data('video-embed-field-modal')}));
15       });
16     }
17   };
18 })(jQuery);