PageSourceSearch

https://www.yourwdwstore.net/assets/templates/yourwdwstore-core/js/main.js?vcart=26.37.3

js yourwdwstore.net collected 2026-10-03 22:24:10 UTC 5,789 bytes, 185 lines download raw bytes

1function update_flyoutcart() {
2    jQuery.ajax({
3        url: '/frontapi.asp',
4        dataType: 'json',
5        type: 'GET',
6        cache: false,
7        data: {
8            module: 'cartajax',
9        },
10        success: function (data) {
11            if (data.ItemsInCart != undefined) {
12                if (data.ItemsInCart.length > 0) {
13                    jQuery('#floating-cart').fadeIn(300);
14                }
15            }
16        },
17        error: function (objError) {
18            //alert('Error');
19            return;
20        }
21    });
22}
23
24function resizeHeaderOnScroll() {
25	var topNav = jQuery(".top-nav").outerHeight();
26	var headerHeight = jQuery("header").outerHeight();
27	var catMenuHeight = jQuery(".site-header.navbar-wrapper").outerHeight();
28	
29  const distanceY = window.pageYOffset || document.documentElement.scrollTop,
30  shrinkOn = topNav + headerHeight + (catMenuHeight/2) + 50,
31  headerEl = document.getElementById('sticky-header');
32  var sliderMargin = jQuery('.static-margin');
33  if (distanceY > shrinkOn) {
34    headerEl.classList.add("smaller");
35	sliderMargin.addClass("active-static-margin");
36	if(jQuery(window).width() > 991){
37		jQuery(".mobile-cart-icon").removeClass("visible-xs");
38		jQuery(".scrolling-logo-holder").removeClass("visible-xs");
39		jQuery(".head-mobile-nav").addClass("fixed-icon-width");
40	}
41  } else {
42    headerEl.classList.remove("smaller");
43	sliderMargin.removeClass("active-static-margin");
44	if(jQuery(window).width() > 991){
45		jQuery(".mobile-cart-icon").addClass("visible-xs");
46		jQuery(".scrolling-logo-holder").addClass("visible-xs");
47		jQuery(".head-mobile-nav").removeClass("fixed-icon-width");
48	}
49  }
50}
51
52window.addEventListener('scroll', resizeHeaderOnScroll);
53
54function addcart_callback(productDiv, data) {
55    jQuery(productDiv).addClass('ajaxcart-complete');
56    setTimeout(function () { jQuery(productDiv).removeClass('ajaxcart-complete'); }, 1000);
57
58    var itemsInCart = 0;
59    var subtotal = 0;
60
61    jQuery(data.ItemsInCart).each(function (index, item) {
62        itemsInCart += item.qty;
63        subtotal += (item.price * item.qty);
64    });
65	//minicart - subtotal
66    subtotal = subtotal.toFixed(jQuery('body').data('decimal'));
67    jQuery('.minicart-items').text(itemsInCart);
68    update_flyoutcart();
69
70    var currency = jQuery('body').data('currency');
71    jQuery('.minicart-subtotal').text(currency + subtotal);
72   
73}
74
75function mailinglist_callfront(form) {
76    jQuery(form).find('.mailinglist-input').prop('disabled', true);
77    jQuery(form).find('.mailinglist-submit').prop('disabled', true);
78    jQuery(form).find('#mailing-btn-txt').addClass('hidden');
79    jQuery(form).find('#mailing-btn-load').removeClass('hidden');
80
81    jQuery('#mailinglist-response').slideUp(300);
82    jQuery('#mailinglist-response div').addClass('hidden');
83}
84
85function mailinglist_response(form, response) {
86
87    jQuery(form).find('.mailinglist-input').prop("disabled", false);
88    jQuery(form).find('.mailinglist-submit').prop("disabled", false);
89
90
91    if (response == 1 || response == 3) {
92        jQuery('#mailinglist-response .mailinglist-subscribed').removeClass('hidden');
93        jQuery('#mailinglist-response').slideDown(300);
94    }
95    else if (response == -1) {
96        jQuery('#mailinglist-response .mailinglist-unsubscribed').removeClass('hidden');
97        jQuery('#mailinglist-response').slideDown(300);
98    }
99    else if (response == 2) {
100        jQuery('#mailinglist-response .mailinglist-error').removeClass('hidden');
101        jQuery('#mailinglist-response').slideDown(300);
102    }
103
104    jQuery(form).find('#mailing-btn-txt').removeClass('hidden');
105    jQuery(form).find('#mailing-btn-load').addClass('hidden');
106
107}
108
109function moveMenu() {
110    var respWidth = window.innerWidth;
111    var ua = navigator.userAgent.toLowerCase();
112    if (ua.indexOf("safari/") !== -1 && ua.indexOf("chrom") === -1) {
113        respWidth = jQuery(window).width();
114    }
115
116    if (respWidth < 767) {
117        jQuery('#menulinks').appendTo('#mobile-menulinks');
118        jQuery('#categories').appendTo('#mobile-categories');
119    }
120    else {
121        jQuery('#menulinks').appendTo('#menulinks-outer');
122        jQuery('#categories').appendTo('#navbar');
123    }
124}
125
126jQuery(document).ready(function () {
127
128    update_flyoutcart();
129
130    jQuery('#mobile-menu-trigger').click(function (e) {
131        e.preventDefault();
132
133        jQuery('#mobile-menu').show(0, function () {
134            jQuery('body').addClass('menu-open');
135        });
136    });
137
138    jQuery('.mobile-menu-close').click(function (e) {
139        e.preventDefault();
140
141        jQuery('body').removeClass('menu-open');
142        setTimeout(function () {
143            jQuery('#mobile-menu').hide(0);
144        }, 250);
145    });
146
147
148    var respWidth = window.innerWidth;
149    if (respWidth >= 767) {
150    	jQuery('.navbar .dropdown').hover(function () {
151    		jQuery(this).find('.dropdown-menu').first().stop(true, true).delay(250).slideDown('fast');
152
153    	}, function () {
154    		jQuery(this).find('.dropdown-menu').first().stop(true, true).delay(100).slideUp('fast');
155
156    	});
157
158    	jQuery('.navbar .dropdown > a').click(function () {
159    		location.href = this.href;
160    	});
161    }
162
163});
164
165jQuery(window).load(function () {
166    moveMenu();
167});
168jQuery(window).resize(function () {
169    moveMenu();
170});
171
172jQuery(function ($) {
173	$('.navbar .dropdown').hover(function () {
174		$(this).find('.dropdown-menu').first().stop(true, true).delay(250).slideDown();
175
176	}, function () {
177		$(this).find('.dropdown-menu').first().stop(true, true).delay(100).slideUp();
178
179	});
180
181	$('.navbar .dropdown > a').click(function () {
182		location.href = this.href;
183	});
184
185});

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.