PageSourceSearch

https://lightcoral-locust-884316.hostingersite.com/wp-content/them…/js/ajax_add_to_cart.js?ver=1791001844

js lightcoral-locust-884316.hostingersite.com collected 2026-10-03 04:33:12 UTC 2,024 bytes, 75 lines download raw bytes

1jQuery(document).ready(function () {�
2	// SUBMIT AJAX REQUEST FOR ADD TO CART.�
3	jQuery(".single_add_to_cart_button").on("click", function (e) {�
4		e.preventDefault();�
5		$thisbutton = $(this);�
6		$form = $thisbutton.closest('form.cart');�
7		id = $thisbutton.val();�
8		product_qty = $form.find('input[name=quantity]').val() || 1;�
9		product_id = $form.find('input[name=product_id]').val() || id;�
10		variation_id = $form.find('input[name=variation_id]').val() || 0;�
11		var data = {�
12			action: 'ql_woocommerce_ajax_add_to_cart',�
13			product_id: product_id,�
14			product_sku: '',�
15			quantity: product_qty,�
16			variation_id: variation_id,�
17		};�
18		console.log(data);�
19		$.ajax({�
20			type: 'post',�
21			url: wc_add_to_cart_params.ajax_url,�
22			data: data,�
23			beforeSend: function (response) {�
24				$thisbutton.removeClass('added').addClass('loading');�
25			},�
26			complete: function (response) {�
27				$thisbutton.addClass('added').removeClass('loading');�
28			},�
29�
30			success: function (response) {�
31�
32				if (response.error & response.product_url) {�
33					swal({�
34						title: "Oh No!",�
35						text: "Sorry, some error occurred. Please try again.",�
36						icon: "error",�
37					});�
38				} else {�
39					$(document.body).trigger('added_to_cart', [response.fragments, response.cart_hash, $thisbutton]);�
40					console.log(response.fragments);�
41					var tl = new TimelineLite({�
42						paused: true,�
43						reversed: true�
44					});�
45					tl.fromTo(�
46						".mobile-slider",�
47						0.3, {�
48						x: 200,�
49						autoAlpha: 0�
50					}, {�
51						x: 0,�
52						autoAlpha: 1,�
53						ease: Power4.easeOut�
54					}�
55					);�
56					tl.to(�
57						".filter",�
58						0.3, {�
59						autoAlpha: 1�
60					},�
61						0�
62					);�
63					tl.play();�
64					$(".close-menu").click(function () {�
65						tl.reverse();�
66					});�
67					// Also close slider when clicking outside of the menu�
68					$(".filter").click(function () {�
69						tl.reverse();�
70					});�
71				}�
72			},�
73		});�
74	});�
75});�

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.