PageSourceSearch

https://www.pvc-strip.co.uk/static/version1742480428/frontend/Piranhaa/Blank/en_GB/js/custom.js

js pvc-strip.co.uk collected 2026-10-07 17:39:27 UTC 6,156 bytes, 190 lines download raw bytes

1require([
2    'jquery',
3    'colorbox',
4    'slick',
5    'yall',
6    'domReady!'
7], function ($) {
8
9	$(function() {
10
11		$(".header li").hover(
12			function () {
13			    $('ul', this).stop().css('display','block');
14			},
15			function () {
16			    $('ul', this).stop().css('display','none');
17			}
18		);
19
20		$(".colorbox").colorbox();
21
22		$(".youtube-colorbox").colorbox({iframe:true, innerWidth:640, innerHeight:390});
23
24		var ytch=30, bw=25, w=640, h=360, maxw=$(window).innerWidth()-2*bw;
25	    if (maxw < w) {
26	        h=Math.floor(h*maxw/w);
27	        w=maxw;
28	    }
29		$(".mprofile a").colorbox({inline:true, width:w});
30		
31		$(".meet-team-box").slick({
32	        infinite: true,
33	        centerMode: true,
34	        slidesToShow: 4,
35	        slidesToScroll: 2,
36	        responsive: [
37			    {
38			      breakpoint: 767,
39			      settings: {
40			        centerMode: true,
41			        centerPadding: '40px',
42			        slidesToShow: 2
43			      }
44			    },
45			    {
46			      breakpoint: 480,
47			      settings: {
48			        arrows: false,
49			        centerMode: true,
50			        centerPadding: '40px',
51			        slidesToShow: 1
52			      }
53			    }
54			]
55	    });
56
57	    $(".slick-slider-four").slick({
58	        infinite: true,
59	        centerMode: true,
60	        centerPadding: '40px',
61	        slidesToShow: 4,
62	        slidesToScroll: 2,
63	        lazyLoad: 'ondemand',
64			responsive: [{
65
66		      breakpoint: 767,
67		      settings: {
68		        centerMode: true,
69		        centerPadding: '40px',
70		        slidesToShow: 2
71		      }
72
73		    }, {
74
75		      breakpoint: 630,
76		      settings: {
77		        arrows: false,
78		        centerMode: true,
79		        centerPadding: '40px',
80		        slidesToShow: 1
81		      }
82
83		    }]
84	    });
85
86
87		//adding info tooltips to forms
88		$(".webforms-fields-comment").each(function() {
89		  var t = $(this).text();
90		  $(this).before("<span class='tooltip'>&nbsp;?&nbsp;<span class='tooltiptext'>"+t+"</span></span>");
91		});
92
93		//adds top plcase order button in checkout
94		//adds click event to trigger "real" order now button when this one is pressed
95		$(".onestepcheckout-index-index h1").after("<div class='osc-place-order-wrapper'><div class='place-order-primary'><button id='top-order-button' class='action primary checkout' type='button'><span>Place Order</span></button></div></div>");
96		$("#top-order-button").on("click", function() {
97		  $("#co-place-order-area button").click();
98		  return false;
99		});
100
101		$(".cms-frequently-asked-questions h3").next("div").css("display","none");
102
103		$(".cms-frequently-asked-questions h3").click(function() {
104		  $(this).next('div').toggle("slow", function() {
105		    // Animation complete.
106		  });
107		});
108
109		// checkout
110		$("body").on("click","#banktransfer",function() {
111			var address = $("#b-details").html();
112			$("p:contains('View bank details')").html(address);
113		 });
114
115		$(".webforms-success-text").bind("DOMSubtreeModified",function(){
116			$('html, body').animate({ scrollTop: 0 }, 0);
117		});
118
119		// $(".mage-error").next("label").addClass("required-red");
120		// $(".checkout-agreement .required-red").after("<div class='mage-errorer' style='display: block;'>This is a required field.</div>");
121
122		$("body").one("click",".payment-method .radio",function() {
123			var t = 0;
124			$(".checkout-agreement label").each(function() {
125				$(this).after("<div class='mage-errorer e"+t+"' style='display: block;'>This is a required field.</div>");
126				t++;
127		 });
128		});
129
130		//POA
131		//for product page
132	    if ( $('.catalog-product-view .super-attribute-select').length ) {
133	    	//alert("here");
134	        if($('.catalog-product-view #product_addtocart_form .price').text().indexOf("£0.00") >= 0){
135	        	//alert("here1");
136	            //$('.catalog-product-view #product_addtocart_form .normal-price').append("POA");
137	            $('.catalog-product-view #product_addtocart_form .price-container').css("display","none");
138	            //$(".catalog-product-view #product_addtocart_form .add-to-cart").css("display","none");
139	        }
140
141	        $('.catalog-product-view .super-attribute-select').on('change', function() {
142	          if($( ".catalog-product-view .super-attribute-select option:selected" ).text().indexOf("POA") >= 0){
143	            //alert("Yes");
144	            $(".catalog-product-view #product_addtocart_form .box-tocart").css("display","none");    
145	            $(".catalog-product-view #product_addtocart_form .product-social-links").css("display","none");   
146	            $(".catalog-product-view #product_addtocart_form .price-container").css("display","none"); 
147	            $(".catalog-product-view #product_addtocart_form .poa-msg").remove();
148	            $(".catalog-product-view #product_addtocart_form .price-container").after("<p class='poa-msg' style='color:red;'><strong>Please call us for a price.</strong></p>");
149	          }
150	          else{
151	            //alert("No");
152	            $(".catalog-product-view #product_addtocart_form .box-tocart").css("display","block");
153	            $(".catalog-product-view #product_addtocart_form .product-social-links").css("display","block");  
154	            $(".catalog-product-view #product_addtocart_form .price-container").css("display","block"); 
155	            $(".catalog-product-view .poa-msg").remove();
156	          }
157	        });
158	    }
159
160		// $("body").on("click","#top-order-button",function() {
161		// 	$(".mage-error").next("label").addClass("required-red");
162		// 	$(".checkout-agreement .required-red").after("<div class='mage-errorer' style='display: block;'>This is a required field.</div>");
163		// });
164
165
166
167		
168		// $("#checkout button").on("click",function() {
169		// 	$(".mage-error").css("border-color","red");
170		// });
171
172		//fix scroll issue on made to measure
173		//$(this).scrollTop(0);
174
175		// $(".categorypath-pvc-strip-curtains-made-to-measure .webforms button").on("click", function() {
176		// 	$('html, body').delay(800).animate({ scrollTop: 0 }, 0);
177		// });
178
179		// $("#banktransfer").on("click", function() {
180		// 	//$(".payment-method-content .checkout-agreements-block").before("<p>hello</p>");
181		// 	console.log('hello');
182		// 	return false;
183		// });
184
185		//fixing bank details bug
186		//var t = $("#b-details").text();
187	
188	});
189
190});

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.