HEX
Server: LiteSpeed
System: Linux server.nevid-deploma.com 4.18.0-553.111.1.lve.el8.x86_64 #1 SMP Fri Mar 13 13:42:17 UTC 2026 x86_64
User: smilepac (1037)
PHP: 8.1.34
Disabled: NONE
Upload Files
File: /home/smilepac/public_html/wp-content/plugins/codevz-plus/wpbakery/assets/js/subscribe.js
jQuery( function( $ ) {
	"use strict";

	Codevz_Plus.subscribe = function() {

		// Fix button height according to input.
		$( '.cz_subscribe_elm' ).codevzPlus( 'subscribe', function( x ) {

			var $this = $( this );
			$this.find( 'button' ).css( 'max-height', $this.find( '[type="email"]' ).outerHeight() );

		});

		// AJAX forms.
		$( 'body' ).off( 'submit', '.cz_subscribe_ajax' ).on( 'submit', '.cz_subscribe_ajax', function( e ) {

			e.preventDefault();

			var $this 	= $( this ),
				nonce 	= $this.attr( 'data-nonce' ),
				email 	= $this.find( 'input[name=email]' ).val(),
				name 	= $this.find( 'input[name=name]' ).val() || email.substring( 0, email.indexOf( '@' ) ),
				website = $this.find( 'input[name=website]' ).val(),
				msg 	= $this.find( '.cz_subscribe_msg' );

			msg.removeClass( 'cz_subscribe_msg_error' ).hide();

			$this.addClass( 'cz_subscribe_loader' ).find( 'input, button' ).attr( 'disabled', 'disabled' );

			$.get( $( 'body' ).attr( 'data-ajax' ), { action: 'cz_subscribe_ajax', name: name, email: email, website: website, nonce: nonce }, function( r ) {

				$this.removeClass( 'cz_subscribe_loader' ).find( 'input, button' ).removeAttr( 'disabled' );

				msg.show().html( r.message );

				if ( r.type ) {

					if ( r.type == '200' ) {
						$this[0].reset();
					}

					if ( r.type == '202' ) {
						msg.addClass( 'cz_subscribe_msg_error' );
					}

				}

			});

		});

	};

	Codevz_Plus.subscribe();

});