PageSourceSearch

https://www.a1bathrooms.co.uk/wp-content/plugins/exo-toolkit/exo-toolkit.js?ver=3.05

js a1bathrooms.co.uk collected 2026-10-06 20:09:37 UTC 10,399 bytes, 134 lines download raw bytes

1// Jquery functions, some written by Exo UK Ltd, and some not (credit given).
2ExoCFSub=ExoData.exoCFS;LogoHoverEffect=ExoData.exoLHE;WoocartAdd=ExoData.exoWOOC;WOOMatchH=ExoData.exoWOOMH;BBCH=ExoData.exoBBCH;SeoCookSc=ExoData.exoSCS;SeoCookScN=ExoData.exoSCSN;FFLC=ExoData.exoFLC;FFLCCN=ExoData.exoFLCCN;FFLCCF=ExoData.exoFLCCF;
3
4jQuery( document ).ready(function() {   
5	//Fluent Forms UI on checkboxes
6	if (FFLC==1){jQuery.ExoInputSwitcher();}
7	
8	//BBCH = BB Column/Row hide/show setting
9	if (BBCH==1){
10    if (typeof FLBuilder !== 'undefined'){
11    	jQuery(document).on('click', '.fl-builder-exo-settings-button', function(e){
12	      jQuery('.fl-col').toggleClass('fl-col-highlight');
13  	    jQuery('.fl-row-content-wrap').toggleClass('fl-row-highlight');
14  	    jQuery('.fl-builder-exo-settings-button').toggleClass('fl-exo-highlight');
15    	})
16  	}	
17	}	
18	
19	// SEOPress Cookie scroll hide
20	if (SeoCookSc==1){
21		if (typeof SeoCookScN === 'undefined') {SeoCookScN=1000;}
22		// Check if SEOPress cookie bar exists first...
23  	if (jQuery("#seopress-user-consent-accept").length > 0) {
24  		var SEOCookieScroll = function(){
25  			var height = jQuery(window).scrollTop();
26      	if (height > SeoCookScN) {
27      		jQuery(this).unbind( "scroll", SEOCookieScroll ); // now stop monitoring scrolling.
28      		jQuery("#seopress-user-consent-accept").trigger("click"); // opt into cookies.
29      	}
30  		}	
31  		jQuery(this).bind( "scroll", SEOCookieScroll ); // bind above function.
32  	}			
33	}	
34	
35	// Contact Form 7 submit (hide form) feature
36	if (ExoCFSub==1){
37		document.addEventListener( 'wpcf7mailsent', function( event ) {
38  		jQuery(".wpcf7-form.sent").find('p').hide(500);
39			jQuery(".wpcf7-form.sent").find(jQuery('[class^="cf7-"]') ).hide(500);
40		}, false );		
41	}
42	
43	// Change viewport after loading, allowing for scaleable material.
44	if (ExoData.exoVP==1){
45	  jQuery('meta[name=viewport]').remove(); jQuery('head').prepend('<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=yes">');
46	}  
47	// WooCommerce add to cart animation	
48	if (WoocartAdd==1){jQuery(".add_to_cart_button").click(function(){jQuery(this).html("<i class='fa fa-refresh fa-spin fa-3x fa-fw' style='font-size:14px;'></i> Adding...")})}
49	// Do woocommerce products matchHeight		
50	if (WOOMatchH==1){jQuery(function() {jQuery('.woocommerce ul.products li.product').matchHeight(); jQuery('.woocommerce ul.products li.product a.product-category').css({'height':'auto'}) });	}	
51
52	if (LogoHoverEffect==1){
53		// Logo hover
54		jQuery('.q_logo img').mouseover(function(){
55			jQuery('.q_logo img').stop().animate({"height": jQuery(this).height()+5}, 600,'easeOutExpo');}).mouseout(function(){jQuery('.q_logo img').stop().animate({"height": jQuery(this).height()-5}, 600,'easeOutElastic')
56		});
57		jQuery('.logoanimate img').mouseover(function(){
58			jQuery('.logoanimate img').stop().animate({"height": jQuery(this).height()+5,"width": jQuery(this).width()+5}, 600,'easeOutExpo');}).mouseout(function(){jQuery('.logoanimate img').stop().animate({"height": jQuery(this).height()-5,"width": jQuery(this).width()-5}, 600,'easeOutElastic')
59		});
60	}			
61	// Clickable divs
62	if (typeof window.FLBuilderConfig == 'undefined'){
63		jQuery(".clickable").click(function(event){if (jQuery(this).find("a").length){window.location.href = jQuery(this).find("a:first").attr("href");event.preventDefault(); } })	
64		jQuery(".clickabletab").click(function(event){if (jQuery(this).find("a").length){window.open(jQuery(this).find("a:first").attr("href"));event.preventDefault();} })	
65	}	
66	
67	//jquery-match-height 
68	if (jQuery('.matchheight .vc_column-inner').length){
69		jQuery(function() {jQuery('.matchheight .vc_column-inner').matchHeight();}); 
70		jQuery(function() {jQuery('.matchheight > .vc_column-inner').matchHeight();});  // fix for templatera/DHVC forms
71	}	
72	if (jQuery('.matchheight .box-holder').length){jQuery(function() {jQuery('.matchheight .box-holder').matchHeight();});}
73	if (jQuery('.matchheights .wpb_wrapper').length){jQuery(function() {jQuery('.matchheights .wpb_wrapper').matchHeight();});}	
74	if (jQuery('.vc-hoverbox-inner').length){jQuery(function() {jQuery('.matchheight .vc-h
vendor: 6,166 bytes, lines 74-134
74overbox-inner').matchHeight();});}
75	if (jQuery('.matchheight vc_column-inner .wpb_wrapper').length){jQuery(function() {jQuery('.matchheight vc_column-inner .wpb_wrapper').matchHeight();});}
76	
77	//focus on search box
78	jQuery('.qode_search_field').closest("form").after("<div class='searchoverlay'></div>");	
79	jQuery('.qode_search_field').focusin(function(e){
80		jQuery('.grid_section .section_inner').css({'position':'static'});
81		jQuery(this).closest('form').css({'z-index':'101'});
82    jQuery(this).closest('form').parent().find('.searchoverlay').fadeIn(300);
83    if (jQuery(this).hasClass('homesearchbox')){jQuery('html, body').animate({scrollTop: jQuery("#searchform").offset().top-150}, 1000);}
84	});
85	jQuery('.qode_search_field').focusout(function(e){
86		jQuery('.grid_section .section_inner').css({'position':'relative'});
87		jQuery(this).closest('form').parent().find('.searchoverlay').fadeOut(300);
88	});
89
90	// simple scroll
91	jQuery(".scrolldown").click(function(event){jQuery('html, body').animate({scrollTop: '+=500px'}, 800);})
92	
93	// detect if mobile, and switch columns so right col is at top if class is 'mobilefirst'
94  var isMobile = window.matchMedia("only screen and (max-width: 760px)");
95  if (isMobile.matches) {jQuery('.mobilefirst:parent').each(function () {jQuery(this).insertBefore(jQuery(this).prev('.mobilelast:parent'));});}	
96		
97});
98
99// input switcher, adds more UI to checkbox & radio buttons. Requires additional CSS
100jQuery.ExoInputSwitcher = function (filter) {
101    var $haul = jQuery('.ff-el-form-check input[type=checkbox],.ff-el-form-check input[type=radio]');
102    if (filter !== undefined && filter.length) {$haul = $haul.filter(filter);}
103    $haul.each(function () {
104			if (jQuery(this).is(":visible")){
105        var $checkbox = jQuery(this).hide(), $labelbox = jQuery(this).parent(),
106        $switcher = jQuery(document.createElement('div')).addClass('exo-ui-switcher').attr('aria-checked', $checkbox.is(':checked'));
107        if ('radio' === $checkbox.attr('type')) {$switcher.attr('data-name', $checkbox.attr('name'));}
108        toggleSwitch = function (e) {
109            if (e.target.type === undefined) {
110                //$checkbox.trigger(e.type); // this when on causes label not to be clicked, so disable on fluent forms.
111            }
112            $switcher.attr('aria-checked', $checkbox.is(':checked'));
113            if ('radio' === $checkbox.attr('type')) {jQuery('.exo-ui-switcher[data-name=' + $checkbox.attr('name') + ']').not($switcher.get(0)).attr('aria-checked', false);}
114        };
115        $labelbox.on('click', toggleSwitch);
116        $switcher.on('click', toggleSwitch);
117        $checkbox.on('click', toggleSwitch);
118    	  $switcher.insertAfter($checkbox);
119			}      	  
120    });
121};
122/*
123* jquery-match-height 0.7.2 by @liabru
124* http://brm.io/jquery-match-height/
125* License MIT
126*/
127!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"undefined"!=typeof module&&module.exports?module.exports=t(require("jquery")):t(jQuery)}(function(t){var e=-1,o=-1,n=function(t){return parseFloat(t)||0},a=function(e){var o=1,a=t(e),i=null,r=[];return a.each(function(){var e=t(this),a=e.offset().top-n(e.css("margin-top")),s=r.length>0?r[r.length-1]:null;null===s?r.push(e):Math.floor(Math.abs(i-a))<=o?r[r.length-1]=s.add(e):r.push(e),i=a}),r},i=function(e){var o={
128byRow:!0,property:"height",target:null,remove:!1};return"object"==typeof e?t.extend(o,e):("boolean"==typeof e?o.byRow=e:"remove"===e&&(o.remove=!0),o)},r=t.fn.matchHeight=function(e){var o=i(e);if(o.remove){var n=this;return this.css(o.property,""),t.each(r._groups,function(t,e){e.elements=e.elements.not(n)}),this}return this.length<=1&&!o.target?this:(r._groups.push({elements:this,options:o}),r._apply(this,o),this)};r.version="0.7.2",r._groups=[],r._throttle=80,r._maintainScroll=!1,r._beforeUpdate=null,
129r._afterUpdate=null,r._rows=a,r._parse=n,r._parseOptions=i,r._apply=function(e,o){var s=i(o),h=t(e),l=[h],c=t(window).scrollTop(),p=t("html").outerHeight(!0),u=h.parents().filter(":hidden");return u.each(function(){var e=t(this);e.data("style-cache",e.attr("style"))}),u.css("display","block"),s.byRow&&!s.target&&(h.each(function(){var e=t(this),o=e.css("display");"inline-block"!==o&&"flex"!==o&&"inline-flex"!==o&&(o="block"),e.data("style-cache",e.attr("style")),e.css({display:o,"padding-top":"0",
130"padding-bottom":"0","margin-top":"0","margin-bottom":"0","border-top-width":"0","border-bottom-width":"0",height:"100px",overflow:"hidden"})}),l=a(h),h.each(function(){var e=t(this);e.attr("style",e.data("style-cache")||"")})),t.each(l,function(e,o){var a=t(o),i=0;if(s.target)i=s.target.outerHeight(!1);else{if(s.byRow&&a.length<=1)return void a.css(s.property,"");a.each(function(){var e=t(this),o=e.attr("style"),n=e.css("display");"inline-block"!==n&&"flex"!==n&&"inline-flex"!==n&&(n="block");var a={
131display:n};a[s.property]="",e.css(a),e.outerHeight(!1)>i&&(i=e.outerHeight(!1)),o?e.attr("style",o):e.css("display","")})}a.each(function(){var e=t(this),o=0;s.target&&e.is(s.target)||("border-box"!==e.css("box-sizing")&&(o+=n(e.css("border-top-width"))+n(e.css("border-bottom-width")),o+=n(e.css("padding-top"))+n(e.css("padding-bottom"))),e.css(s.property,i-o+"px"))})}),u.each(function(){var e=t(this);e.attr("style",e.data("style-cache")||null)}),r._maintainScroll&&t(window).scrollTop(c/p*t("html").outerHeight(!0)),
132this},r._applyDataApi=function(){var e={};t("[data-match-height], [data-mh]").each(function(){var o=t(this),n=o.attr("data-mh")||o.attr("data-match-height");n in e?e[n]=e[n].add(o):e[n]=o}),t.each(e,function(){this.matchHeight(!0)})};var s=function(e){r._beforeUpdate&&r._beforeUpdate(e,r._groups),t.each(r._groups,function(){r._apply(this.elements,this.options)}),r._afterUpdate&&r._afterUpdate(e,r._groups)};r._update=function(n,a){if(a&&"resize"===a.type){var i=t(window).width();if(i===e)return;e=i;
133}n?o===-1&&(o=setTimeout(function(){s(a),o=-1},r._throttle)):s(a)},t(r._applyDataApi);var h=t.fn.on?"on":"bind";t(window)[h]("load",function(t){r._update(!1,t)}),t(window)[h]("resize orientationchange",function(t){r._update(!0,t)})});
134

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.