jQuery( document ).ready( function( $ ) {

	/* WISE */
	$( document ).on( 'click', '.js-generate-profile-id', function( e ) {
		$( this ).text( wpj_vars.lbl_loading );

		$.ajax({
			type   : "POST",
			url    : wpj_vars.ajaxurl,
			data   : { action: 'generate_profile_id_action' },
			success: function( response ) {
				$( '.js-generate-profile-id' ).text( 'Generate Profile ID' );
				$( '.js-profile-id-content' ).html( response );
			}
		});
	});

});