PageSourceSearch

https://www.dermatouchrn.com/wp-content/themes/twentytwentyone-child/assets/js/custom.js??v=1791081391

js dermatouchrn.com collected 2026-10-04 02:37:10 UTC 12,285 bytes, 393 lines download raw bytes

1$(document).ready(function () {
2    /******** Banner ********* */
3    var swiper = new Swiper(".banner-area .swiper", {
4        navigation: {
5          nextEl: ".banner-area .swiper-button-next",
6          prevEl: ".banner-area .swiper-button-prev",
7        },
8        pagination: {
9            el: ".banner-area .swiper-pagination",
10            clickable: true,
11        },
12    });
13	
14});
15$('.p-pg-btn a.common-button').click(function(){
16    $('html, body').animate({
17        scrollTop: $( $(this).attr('href') ).offset().top - 200
18    }, 500);
19    return false;
20});
21
22$(window).scroll(function() {
23	// For Sticky Navbar
24    if ($(window).scrollTop() > 300) { 
25        $('.header-area').addClass('fixed_header');
26    } else {
27        $('.header-area').removeClass('fixed_header');
28    }
29    if ($(window).scrollTop() > 400) {
30        $('.header-area').addClass('stky');
31    } else {
32        $('.header-area').removeClass('stky');
33    }
34});
35
36$(document).ready(function () {
37    /*========accordion==========*/
38    $(".accordion > li > span").click(function() {
39        $(this).toggleClass("active").next('div').slideToggle(250)
40        .closest('li').siblings().find('span').removeClass('active').next('div').slideUp(250);
41    });   
42}); 
43
44$(document).ready(function () {
45	// ======gallery-filter-catagory
46	$(".checkbox-dropdown-list").click(function (e) {
47		e.stopPropagation();
48	});
49	$(window).on("load resize", function (e) {
50		if ($(window).width() < 992) {
51			$(".filter-options-open-wapper").slideUp();
52			$('.gallery-filter-sec').insertBefore(".gallery-category-top");
53		} else {
54			$(".filter-options-open-wapper").slideDown();
55			$('.gallery-filter-sec').insertBefore(".gal-category-area");
56		}
57	});
58	//================= gallery-case
59	var swiper = new Swiper(".gal-case-thumb .swiper-container", {
60		spaceBetween: 25,
61		slidesPerView: 4,
62		breakpoints: {
63			120: {
64				spaceBetween: 12,
65			},
66			992: {
67				spaceBetween: 25,
68			},
69		},
70		freeMode: true,
71		watchSlidesProgress: true,
72	});
73	var swiper2 = new Swiper(".gal-case-top .swiper-container", {
74		spaceBetween: 25,
75		thumbs: {
76			swiper: swiper,
77		},
78	});
79	//================= gallery-case
80	$(function () {
81		$('.areas-of-top-wrapper li a[href^="#"]').click(function (evt) {
82			evt.preventDefault();
83			var target = $(this).attr('href');
84			if ($(target).length) {
85				$('html, body').animate({
86					scrollTop: $(target).offset().top - 200
87				}, 500);
88			}
89			return false;
90		});
91	});
92});
93
94$(document).ready(function () {
95    /*========accordion==========*/
96    $("#dlm_faq > .faq-item  > h3").click(function() {
97        $(this).toggleClass("active").next('div').slideToggle(250)
98        .closest('.faq-item').siblings().find('h3').removeClass('active').next('div').slideUp(250);
99    }); 
100	
101	
102    
103});  
104
105  //%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Paints testimonials %%%%%%%%%%%%%%%%%%%%%%%%%%%% 
106  var swiper = new Swiper(".patient-testimonial-slider .mySwiper", {
107    pagination: {
108      el: ".swiper-pagination",
109    },
110    navigation: {
111      nextEl: ".patient-testimonial-slider .swiper-button-next",
112      prevEl: ".patient-testimonial-slider .swiper-button-prev",
113    },
114  });
115
116/*=============================gallery category===============================*/
117/*$.fn.BeerSlider = function( options ) {
118	options = options || {};
119	return this.each( function () {
120		new BeerSlider( this, options );
121	});
122};
123$( ".beer-slider" ).each( function( index, el ) {
124	$( el ).BeerSlider( {start: $( el ).data( "start" ) } )
125});*/
126
127
128
129
130
131$(document).ready(function () {
132	$(".gallery-category-filter-wrapper h5").click(function () {
133		$(".filter-options-open-wapper").slideToggle();
134	});
135	$('.filter-option-dropdown-child li').click(function () {
136		var attr_link = $(this).attr('attr-link');
137		$("#filter-form").attr("action", attr_link);
138	});
139
140	//Filter
141	$('.main-bar-closed').click(function () {
142		var t = $(this);
143		t.toggleClass('open');
144		if (t.hasClass('open')) {
145			$('.open-overlay').addClass('open');
146		} else {
147			$('.open-overlay').removeClass('open');
148		}
149
150	});
151	$('.filter-option-select').click(function() {
152		if ($(this).hasClass('open')) {
153			$(this).removeClass('open');
154		} else {
155			$('.filter-option-select').removeClass('open');
156			$(this).addClass('open');
157		}
158	});
159
160	$('.filter-option-dropdown.filter-option-dropdown-get-val li').click(function(){
161		$(this).parent("ul.filter-option-dropdown").children().removeClass('active');
162		$(this).addClass('active');
163		var value = $(this).attr('attr-val');
164		var value_title = $(this).attr('attr-title');
165		var filter_option = $(this).parent('.filter-option-dropdown').parent('.filter-option');
166		filter_option.find('input').val(value);
167		filter_option.find('.title_filter').html(value_title);
168	  });
169	  $('.filter-option-dropdown li').click(function(){
170		$(this).parent("ul.filter-option-dropdown").children().removeClass('active');
171		$(this).addClass('active');
172		var value = $(this).attr('attr-val');
173		var value_title = $(this).attr('attr-title');
174		var filter_option = $(this).parent('.filter-option-dropdown').parent('.filter-option');
175		filter_option.find('input').val(value);
176		filter_option.find('.title_filter').html(value_title);
177	  });
178	  $('.filter-option-dropdown-child li').click(function(){
179		$(this).parents('.filter-option-dropdown').children('li').children("ul.filter-option-dropdown-child").children().removeClass('active');
180		$(this).addClass('active');
181		$(this).parent().siblings(".filter-option-select").removeClass("open");
182		$(this).parent().siblings(".filter-option-select").removeClass("is-active");
183		var value = $(this).attr('attr-val');
184		var value_title = $(this).attr('attr-title');
185		var filter_option = $(this).parents('.filter-option-dropdown').parent('.filter-option');
186		filter_option.find('input').val(value);
187		filter_option.find('.title_filter').html(value_title);
188	});
189	window.addEventListener('click', function (e) {
190		if (document.getElementById('filter-form').contains(e.target)) {} else {
191			$(".filter-option-select").removeClass('open');
192		}
193	});
194	if ($("input[name=age]").val("") == "") {
195		$(".filter-2 .title_filter").text("Show All");
196	}
197	if ($("input[name=gender]").val("") == "") {
198		$(".filter-3 .title_filter").text("Show All");
199	}
200	if ($("input[name=doctor]").val("") == "") {
201		$(".filter-4 .title_filter").text("Show All");
202	}
203	if ($("input[name=implant_size]").val("") == "") {
204		$(".filter-5 .title_filter").text("Show All");
205	}
206	$('#configreset').click(function () {
207		$(".filter-1 .title_filter").text("Buttocks Implants");
208		$(".filter-2 .title_filter").text("Show All");
209		$(".filter-3 .title_filter").text("Show All");
210		$(".filter-4 .title_filter").text("Show All");
211		$(".filter-5 .title_filter").text("Show All");
212		$("input[name=procedure]").val("209");
213
214		$("input[name=age]").val("");
215		$("input[name=gender]").val("");
216		$("input[name=doctor]").val("");
217		$("input[name=implant_size]").val("");
218	});
219
220	$(function () {
221		setCheckboxSelectLabels();
222		$('.toggle-next').click(function () {
223			$(this).parents('.each-select-box').find('.checkboxes').slideToggle(400);
224		});
225		$('.ckkBox').change(function () {
226			toggleCheckedAll(this);
227			setCheckboxSelectLabels();
228		});
229	});
230
231	function setCheckboxSelectLabels(elem) {
232		var wrappers = $('.wrapper');
233		$.each(wrappers, function (key, wrapper) {
234			var checkboxes = $(wrapper).find('.ckkBox');
235			var label = $(wrapper).find('.checkboxes').attr('id');
236			var prevText = '';
237			$.each(checkboxes, function (i, checkbox) {
238				var button = $(wrapper).find('button');
239				if ($(checkbox).prop('checked') == true) {
240					var text = $(checkbox).next().html();
241					var btnText = prevText + text;
242					var numberOfChecked = $(wrapper).find('input.val:checkbox:checked').length;
243					if (numberOfChecked >= 4) {
244						btnText = numberOfChecked + ' ' + label + ' selected';
245					}
246					$(button).text(btnText);
247					prevText = btnText + ', ';
248				}
249			});
250		});
251	}
252
253	function toggleCheckedAll(checkbox) {
254		var apply = $(checkbox).closest('.wrapper').find('.apply-selection');
255		apply.fadeIn('slow');
256		var val = $(checkbox).closest('.checkboxes').find('.val');
257		var all = $(checkbox).closest('.checkboxes').find('.all');
258		var ckkBox = $(checkbox).closest('.checkboxes').find('.ckkBox');
259		if (!$(ckkBox).is(':checked')) {
260			$(all).prop('checked', true);
261			return;
262		}
263		if ($(checkbox).hasClass('all')) {
264			$(val).prop('checked', false);
265		} else {
266			$(all).prop('checked', false);
267		}
268	}
269});
270
271function calculateBMI() {
272	let height = document.getElementById("height").value;
273	let weight = document.getElementById("weight").value;
274	
275	let heightParts = height.split(".");
276	let feet = parseInt(heightParts[0]);
277	let inches = heightParts.length > 1 ? parseInt(heightParts[1]) : 0;
278	
279	let heightInInches = (feet * 12) + inches;
280	let heightInMeters = heightInInches * 0.0254;
281	let weightInKg = weight * 0.453592;
282	
283	if (heightInMeters > 0 && weightInKg > 0) {
284		let bmi = (weightInKg / (heightInMeters * heightInMeters)).toFixed(1);
285		let status = "";
286		if (bmi < 18.5) {
287			status = "Underweight";
288		} else if (bmi >= 18.5 && bmi < 24.9) {
289			status = "Healthy Weight";
290		} else if (bmi >= 25 && bmi < 29.9) {
291			status = "Overweight";
292		} else {
293			status = "Obese";
294		}
295		document.getElementById("result").innerHTML = `Your BMI Score: ${status} <br> <span> ${bmi} <span>`;
296	} else {
297		alert("Please enter valid height and weight");
298	}
299}
300jQuery(window).on("load resize",function(e){
301if (jQuery(window).width() < 1200) {
302	jQuery('.bmi-gender').insertAfter(".bmi-hw");
303}
304else {
305   jQuery('.bmi-gender').insertAfter(".bmi-age");
306}
307});
308
309/*$.fn.BeerSlider = function( options ) {
310		options = options || {};
311		return this.each( function () {
312			new BeerSlider( this, options );
313		});
314	};
315$( ".beer-slider" ).each( function( index, el ) {
316	$( el ).BeerSlider( {start: $( el ).data( "start" ) } )
317});
318if ($(window).width() > 992) {
319	var gallery = jQuery('.natural-looking-results-content').outerHeight();
320	//alert(gallery);
321	$('.beer-slider img').css('min-height', gallery+'px');
322}*/
323// $(document).ready(function() {
324//         $(".beer-slider").each(function() {
325//             new BeerSlider(this, { start: $(this).data("start") });
326//         });
327//     });
328
329// $(document).ready(function() {
330// 	$.fn.BeerSlider = function( options ) {
331// 		options = options || {};
332// 		return this.each( function () {
333// 			new BeerSlider( this, options );
334// 		});
335// 	};
336// 	$( ".beer-slider" ).each( function( index, el ) {
337// 		$( el ).BeerSlider( {start: $( el ).data( "start" ) } )
338// 	});
339// 	if ($(window).width() > 992) {
340// 		var gallery = jQuery('.natural-looking-results-content').outerHeight();
341// 		//alert(gallery);
342// 		$('.beer-slider img').css('min-height', gallery+'px');
343// 	}
344// });
345
346$(document).ready(function() {
347    $.fn.BeerSlider = function(options) {
348        options = options || {};
349        return this.each(function() {
350            new BeerSlider(this, options);
351        });
352    };
353
354    $(".beer-slider").each(function(index, el) {
355        $(el).BeerSlider({ start: $(el).data("start") });
356    });
357
358    // Handle touch and mouse events
359    $('.beer-range').each(function() {
360        const rangeInput = this;
361        const slider = $(rangeInput).closest('.beer-slider');
362        const handle = slider.find('.beer-handle');
363        const reveal = slider.find('.beer-reveal');
364
365        const updateSlider = (value) => {
366            reveal.css('width', value + '%');
367            handle.css('left', value + '%');
368        };
369
370        // Standard input event
371        $(rangeInput).on('input', function() {
372            updateSlider(this.value);
373        });
374
375        // Custom touch handling for iPhones
376        rangeInput.addEventListener('touchmove', function(e) {
377            e.preventDefault(); // Prevent scrolling
378            const touch = e.touches[0];
379            const rect = rangeInput.getBoundingClientRect();
380            let position = ((touch.clientX - rect.left) / rect.width) * 100;
381            position = Math.max(0, Math.min(100, position)); // Clamp between 0 and 100
382            updateSlider(position);
383            rangeInput.value = position;
384        }, { passive: false });
385    });
386
387    // Responsive image handling
388    $(window).on('resize', function() {
389        $('.beer-slider img').css('width', '100%');
390    });
391});
392
393

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.