PluginProbe
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages / 2.0.1
Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages v2.0.1
3.4.1 3.4.0 3.3.9 3.3.8 3.3.7 3.3.6 3.3.5 3.3.4 3.3.3 3.3.2 3.3.1 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.8 2.2.9 2.3.0 2.3.1 2.3.2 2.3.3 All 194 releases
convertkit / resources / backend / js / setup-wizard.js

setup-wizard.js in Kit (formerly ConvertKit) – Email Newsletter, Email Marketing, Membership, Subscribers and Landing Pages 2.0.1, at resources/backend/js/setup-wizard.js

52 lines 1.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Setup Wizard
3 *
4 * @package ConvertKit
5 * @author ConvertKit
6 */
7
8 /**
9 * Conditionally shows and hides elements when a button or link is clicked, based on that
10 * button/link's configuration.
11 *
12 * @since 1.9.8.4
13 */
14 jQuery( document ).ready(
15 function( $ ) {
16
17 // Redirect parent screen to a given URL after clicking a link that opens
18 // the href URL in a new tab.
19 $( 'a.convertkit-redirect' ).on(
20 'click',
21 function( e ) {
22
23 var link = this;
24
25 // Delay the redirect, otherwise browsers will block opening the href attribute
26 // thinking it's a popup.
27 setTimeout(
28 function() {
29 // Redirect the parent screen to the link's data-convertkit-redirect-url property.
30 window.location.href = $( link ).data( 'convertkit-redirect-url' );
31 },
32 1000
33 );
34
35 }
36 );
37
38 // Show a confirmation dialog for specific links.
39 $( 'a.convertkit-confirm' ).on(
40 'click',
41 function( e ) {
42
43 if ( ! confirm( $( this ).data( 'message' ) ) ) {
44 e.preventDefault();
45 }
46
47 }
48 );
49
50 }
51 );
52