# mxchat-basic/1.0.7/js/mxchat-admin.js

MxChat – AI Chatbot &amp; Content Generation for WordPress, version 1.0.7. 35 lines.

- Page: https://pluginprobe.com/plugins/mxchat-basic/1.0.7/code/js/mxchat-admin.js
- Raw: https://pluginprobe.com/plugins/mxchat-basic/1.0.7/raw/js/mxchat-admin.js
- Modified: 2024-09-11T13:11:48+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/mxchat-basic/1.0.7/code/js/mxchat-admin.js#L10-L20`.

```javascript
jQuery(document).ready(function($) {
    $('#mxchat-activation-form').on('submit', function(event) {
        event.preventDefault();

        var formData = {
            action: 'mxchat_activate_license',
            email: $('#mxchat_pro_email').val(),
            key: $('#mxchat_activation_key').val(),
            security: mxchatAdmin.nonce
        };

        $.post(mxchatAdmin.ajax_url, formData, function(response) {
            if (response.success) {
                $('#mxchat-license-status').text('Active');
            } else {
                $('#mxchat-license-status').text('Inactive');
                alert(response.data);
            }
        });
    });
    
    $('.nav-tab').on('click', function(e) {
        e.preventDefault();
        $('.nav-tab').removeClass('nav-tab-active');
        $(this).addClass('nav-tab-active');
        $('.tab-content').removeClass('active').hide();
        var activeTab = $(this).attr('href');
        $(activeTab).addClass('active').show();
    });

    // Activate the first tab by default
    $('.nav-tab-active').trigger('click');

});

```
