PageSourceSearch

https://magscholar.com/js/contact.js

js magscholar.com collected 2026-10-04 13:56:37 UTC 1,056 bytes, 39 lines download raw bytes

1(function ($) {
2    'use strict';
3
4    var form = $('.contact__form'),
5        message = $('.contact__msg'),
6        form_data;
7
8    // Success function
9    function done_func(response) {
10        message.fadeIn().removeClass('alert-danger').addClass('alert-success');
11        message.text(response);
12        setTimeout(function () {
13            message.fadeOut();
14        }, 2000);
15        form.find('input:not([type="submit"]), textarea').val('');
16    }
17
18    // fail function
19    function fail_func(data) {
20        message.fadeIn().removeClass('alert-success').addClass('alert-success');
21        message.text(data.responseText);
22        setTimeout(function () {
23            message.fadeOut();
24        }, 2000);
25    }
26    
27    form.submit(function (e) {
28        e.preventDefault();
29        form_data = $(this).serialize();
30        $.ajax({
31            type: 'POST',
32            url: form.attr('action'),
33            data: form_data
34        })
35        .done(done_func)
36        .fail(fail_func);
37    });
38    
39})(jQuery);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.