PageSourceSearch

https://www.grepalma.org/wp-content/themes/grepalma/js/newsletter.js

js grepalma.org collected 2026-10-06 13:44:57 UTC 1,478 bytes, 48 lines download raw bytes

1var $ = jQuery.noConflict();
2$(document).ready(function(){
3  var errorsList = '';
4    $("#newsletter").validate({
5      onfocusout: false,
6      onkeyup: false,
7      onclick: false,
8      rules: {
9        correo_newsletter: {required: true,  email: true},
10      },
11      messages: {
12        correo_newsletter:{required: "Ingresa tu correo.", email: "La dirección de correo no es válida."},
13      },
14      submitHandler: function(form){
15        $.getJSON( get_template_directory_uri + '/inc/newsletter.php', $(form).serialize())
16        .done(function(data){
17          if(data.response == true){
18            alertify.success(data.message);
19            location.reload();
20          } else {
21            alertify.error(data.message);
22          }
23        })
24        .fail(function(data){
25          alertify.error(data.message);
26        });
27      },
28      showErrors: function(errorMap, errorList) {
29        this.defaultShowErrors();
30        $(errorList).each(function(){
31          errorsList += $(this)[0].message + '<br/>';
32        });
33        if (errorsList){
34          alertify.error(errorsList);
35        }
36        errorsList = '';
37      }
38    });
39    $("#newsletter input[type='submit']").on('click',function(){
40        var validator = $("#newsletter").valid();
41          if (!validator) {
42              alertify.error("Todos los campos son requeridos");
43          } else {
44              $("#newsletter").submit();
45          }
46          return false;
47    });
48});

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.