PageSourceSearch

https://www.slumberworldhawaii.com/js/pages/shopping-cart/delivery.js

js slumberworldhawaii.com collected 2026-10-04 12:51:38 UTC 3,065 bytes, 73 lines download raw bytes

1(function () {
2
3/*****************/
4/* Delivery Lookup */
5/*****************/
6
7/* Delivery lookup on viewcart and item page -- can be used anywhere */
8$('body').on('input', ".zipcodeLookupInput", function () {
9    var zipInputVal = $('.zipcodeLookupInput').val();
10
11    //console.log(zipInputVal);
12    //If they have something entered it should be enabled. If not, it should be disabled.
13    $('.delivery-lookup__submit').prop("disabled", zipInputVal.length < 3);
14});
15
16$('body').on("keypress", ".delivery-lookup__input input", function (e) { if (e.keyCode === 13) { $(".delivery-lookup__submit").click(); } });
17$("body").on("click", ".delivery-lookup__submit", function () {
18    $(this).html('<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span>');
19
20    var zipcode = $(this).siblings("#ZipCode").val();
21    var gpid = $(this).data("gpid");
22
23    return $.ajax({
24        type: "POST",
25        url: Utils.baseUrl + 'shoppingcart/Delivery/ZipCodeLookup',
26        contentType: "application/json; charset=utf-8",
27        data: JSON.stringify({ "zipCode": zipcode, "gpid": gpid })
28    }).then(function (data) {
29        $(".delivery-lookup").replaceWith(data);
30    });
31});
32
33$("body").on("click", ".delivery-lookup__change-zip", function () { $(".delivery-lookup__input").addClass("__active"); });
34
35
36
37/*****************/
38/* Zip Code Lookup that only returns whether the zip code is included in delivery rules */
39/*****************/
40
41// Disable up and down keys.
42$('body').on('keydown', '.zipcode-lookup input[type=number]', function (e) {
43    if (e.which == 38 || e.which == 40)
44        e.preventDefault();
45});
46
47$('body').on('input', ".checkZipcodeInput", function () {
48    var zipInputVal = $('.checkZipcodeInput').val();
49
50    //If they have something entered it should be enabled. If not, it should be disabled.
51    $('.zipcode-lookup__submit').prop("disabled", zipInputVal.length < 3);
52});
53
54// Lookup zip code
55$('body').on("keypress", ".zipcode-lookup__input input", function (e) { if (e.keyCode === 13) { e.preventDefault(); $(".zipcode-lookup__submit").click(); } });
56$("body").on("click", ".zipcode-lookup__submit", function () {
57    $(this).html("<span class=\"spinner-border spinner-border-sm\" role=\"status\" aria-hidden=\"true\"></span>");
58
59    var model = {};
60    model.zipcode = $(this).siblings(".zipcode-lookup__input").children("#ZipCode").val();
61    model.useContactUsLookup = $(this).siblings(".zipcode-lookup__contact-us-lookup").val();
62    model.useV2 = $(this).siblings(".zipcode-lookup__v2").val();
63    model.deliveryTitle = $(this).siblings(".zipcode-lookup__delivery-title").val();
64    model.disclaimerText = $(this).siblings(".zipcode-lookup__disclaimer-text").val();
65    model.buttonText = $(this).siblings(".zipcode-lookup__button-text").val();
66
67    return $.post(Utils.baseUrl + 'shoppingcart/Delivery/CheckUserZipCode', model)
68        .then(function (data) {
69            $(".zipcode-lookup").replaceWith(data);
70        });
71});
72
73}());

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.