PluginProbe
Poll Maker by AYS – Versus Polls, Anonymous Polls, Image Polls / 5.6.3
Poll Maker by AYS – Versus Polls, Anonymous Polls, Image Polls v5.6.3
6.5.0 6.4.9 6.4.8 6.4.7 6.4.6 6.4.5 6.4.4 6.4.3 6.4.2 6.4.1 6.4.0 6.3.9 6.3.8 6.3.7 6.3.6 6.3.5 6.3.4 6.3.3 5.6.0 5.6.1 5.6.2 5.6.3 5.6.4 5.6.5 5.6.6 All 153 releases
poll-maker / admin / js / poll-maker-ays-welcome.js

poll-maker-ays-welcome.js in Poll Maker by AYS – Versus Polls, Anonymous Polls, Image Polls 5.6.3, at admin/js/poll-maker-ays-welcome.js

36 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 (function ($) {
2 // Open modal and play How To video.
3 $( document ).on( 'click', '#poll-maker-welcome .play-video', function( event ) {
4 event.preventDefault();
5
6 var video = '<div class="poll-maker-welcome-video-container"><iframe height="400" loading="lazy" src="https://www.youtube.com/embed/0dfJQdAwdL4" frameborder="0" allowfullscreen></iframe></div>';
7
8 var modal = $('<div class="poll-maker-welcome-modal"></div>');
9 var modalContent = $('<div class="poll-maker-welcome-modal-content"></div>');
10 var closeIcon = $('<span class="poll-maker-welcome-modal-close">&times;</span>');
11
12 modal.append(modalContent);
13 modalContent.append(closeIcon);
14 modalContent.append(video);
15
16 $('body').append(modal);
17
18 closeIcon.on('click', function () {
19 modal.remove();
20 });
21
22 $(document).on('keyup', function (event) {
23 if (event.key === 'Escape') {
24 modal.remove();
25 }
26 });
27
28 modal.on('click', function (event) {
29 if (!$(event.target).closest('.poll-maker-welcome-modal-content').length) {
30 modal.remove();
31 }
32 });
33
34 } );
35 })(jQuery);
36