PageSourceSearch

https://breathewithjp.com/wp-content/plugins/fooevents/js/events-frontend.js

js breathewithjp.com collected 2026-09-26 06:46:28 UTC 4,020 bytes, 103 lines download raw bytes

1(function ($) {
2
3    jQuery('.fooevents-copy-from-purchaser').on('click', function () {
4
5        var billing_first_name = jQuery('#billing_first_name').val();
6        var billing_last_name = jQuery('#billing_last_name').val();
7        var billing_email = jQuery('#billing_email').val();
8        var billing_phone = jQuery('#billing_phone').val();
9        var billing_company = jQuery('#billing_company').val();
10
11        var parent = jQuery(this).parent('p').parent('div');
12
13        parent.find('input').closest('.fooevents-attendee-first-name input').val(billing_first_name);
14        parent.find('input').closest('.fooevents-attendee-last-name input').val(billing_last_name);
15        parent.find('input').closest('.fooevents-attendee-email input').val(billing_email);
16        parent.find('input').closest('.fooevents-attendee-telephone input').val(billing_phone);
17        parent.find('input').closest('.fooevents-attendee-company input').val(billing_company);
18
19        return false;
20
21    });
22
23    if ('autocopy' == frontObj.copyFromPurchaser || 'autocopyhideemail' == frontObj.copyFromPurchaser) {
24
25        var billing_first_name = jQuery('#billing_first_name').val();
26        var billing_last_name = jQuery('#billing_last_name').val();
27        var billing_email = jQuery('#billing_email').val();
28        var billing_phone = jQuery('#billing_phone').val();
29        var billing_company = jQuery('#billing_company').val();
30
31        jQuery('.fooevents-attendee-first-name input').val(billing_first_name);
32        jQuery('.fooevents-attendee-last-name input').val(billing_last_name);
33        jQuery('.fooevents-attendee-email input').val(billing_email);
34        jQuery('.fooevents-attendee-telephone input').val(billing_phone);
35        jQuery('.fooevents-attendee-company input').val(billing_company);
36
37        jQuery('.woocommerce-billing-fields input').not('.attendee-class input').on('change', function () {
38
39            var billing_first_name = jQuery('#billing_first_name').val();
40            var billing_last_name = jQuery('#billing_last_name').val();
41            var billing_email = jQuery('#billing_email').val();
42            var billing_phone = jQuery('#billing_phone').val();
43            var billing_company = jQuery('#billing_company').val();
44
45            jQuery('.fooevents-attendee-first-name input').val(billing_first_name);
46            jQuery('.fooevents-attendee-last-name input').val(billing_last_name);
47            jQuery('.fooevents-attendee-email input').val(billing_email);
48            jQuery('.fooevents-attendee-telephone input').val(billing_phone);
49            jQuery('.fooevents-attendee-company input').val(billing_company);
50
51        });
52
53    }
54
55})(jQuery);
56
57(function ($) {
58
59    jQuery(document).on('click', '.fooevents-variation-row__details label', function (event) {
60
61        var inputID = jQuery(this).attr('for');
62        var quantityInputElement = inputID ? document.getElementById(inputID) : null;
63
64        if (! quantityInputElement) {
65            return;
66        }
67
68        var quantityInput = jQuery(quantityInputElement);
69        var maxValue = parseFloat(quantityInput.attr('max'));
70
71        // Out-of-stock rows are rendered as readonly (and max 0), so do not increment.
72        if (quantityInput.prop('readonly') || quantityInput.prop('disabled') || (! isNaN(maxValue) && maxValue <= 0)) {
73            return;
74        }
75
76        event.preventDefault();
77
78        var stepValue = parseFloat(quantityInput.attr('step'));
79        var currentValue = parseFloat(quantityInput.val());
80
81        if (isNaN(stepValue) || stepValue <= 0) {
82            stepValue = 1;
83        }
84
85        if (isNaN(currentValue) || currentValue < 0) {
86            currentValue = 0;
87        }
88
89        var newValue = currentValue + stepValue;
90
91        if (! isNaN(maxValue) && maxValue > 0 && newValue > maxValue) {
92            newValue = maxValue;
93        }
94
95        quantityInput
96            .val(newValue)
97            .trigger('input')
98            .trigger('change')
99            .focus();
100
101    });
102
103})(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.