Ring Size Calculator Based on Height and Weight

Ring Size Calculator Based on Height and Weight – Accurate Estimation :root { –primary-color: #004a99; –success-color: #28a745; –background-color: #f8f9fa; –text-color: #333; –border-color: #ccc; –shadow-color: rgba(0, 0, 0, 0.1); –white: #fff; } body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: var(–background-color); color: var(–text-color); line-height: 1.6; margin: 0; padding: 0; } .container { max-width: 960px; margin: 20px auto; padding: 20px; background-color: var(–white); border-radius: 8px; box-shadow: 0 2px 10px var(–shadow-color); display: flex; flex-direction: column; align-items: center; } h1, h2, h3 { color: var(–primary-color); text-align: center; margin-bottom: 1.5rem; } .calculator-wrapper { width: 100%; background-color: var(–white); padding: 30px; border-radius: 8px; box-shadow: 0 2px 10px var(–shadow-color); margin-bottom: 30px; display: flex; flex-direction: column; align-items: center; } .input-group { width: 100%; max-width: 400px; margin-bottom: 20px; display: flex; flex-direction: column; align-items: flex-start; } .input-group label { display: block; margin-bottom: 8px; font-weight: bold; color: var(–primary-color); } .input-group input, .input-group select { width: 100%; padding: 12px; border: 1px solid var(–border-color); border-radius: 5px; box-sizing: border-box; font-size: 1rem; } .input-group input[type="number"] { -moz-appearance: textfield; /* Firefox */ } .input-group input[type="number"]::-webkit-outer-spin-button, .input-group input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; /* Safari and Chrome */ margin: 0; } .input-group .helper-text { font-size: 0.85em; color: #666; margin-top: 5px; } .input-group .error-message { color: red; font-size: 0.8em; margin-top: 5px; display: none; /* Hidden by default */ } .button-group { display: flex; justify-content: center; gap: 15px; margin-top: 25px; width: 100%; max-width: 400px; } button { padding: 12px 25px; border: none; border-radius: 5px; cursor: pointer; font-size: 1rem; font-weight: bold; transition: background-color 0.3s ease, transform 0.2s ease; white-space: nowrap; } button.primary { background-color: var(–primary-color); color: var(–white); } button.primary:hover { background-color: #003a7a; transform: translateY(-1px); } button.secondary { background-color: #e0e0e0; color: var(–text-color); border: 1px solid var(–border-color); } button.secondary:hover { background-color: #d5d5d5; transform: translateY(-1px); } .results-wrapper { width: 100%; margin-top: 30px; padding: 25px; border-top: 2px solid var(–primary-color); display: flex; flex-direction: column; align-items: center; } .results-wrapper h3 { margin-bottom: 15px; } .primary-result { background-color: var(–success-color); color: var(–white); padding: 15px 25px; border-radius: 8px; font-size: 2em; font-weight: bold; margin-bottom: 20px; text-align: center; box-shadow: 0 4px 8px var(–shadow-color); } .intermediate-results { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; margin-bottom: 25px; width: 100%; } .intermediate-results div { background-color: var(–white); padding: 15px; border: 1px solid var(–border-color); border-radius: 6px; text-align: center; box-shadow: 0 2px 5px var(–shadow-color); flex: 1; min-width: 150px; max-width: 200px; } .intermediate-results span { display: block; font-weight: bold; font-size: 1.3em; color: var(–primary-color); } .formula-explanation { font-size: 0.9em; color: #555; text-align: center; margin-top: 10px; padding: 10px; background-color: #f0f0f0; border-radius: 5px; width: 100%; max-width: 500px; } .chart-container { width: 100%; max-width: 600px; margin-top: 30px; padding: 20px; background-color: var(–white); border-radius: 8px; box-shadow: 0 2px 10px var(–shadow-color); display: flex; flex-direction: column; align-items: center; } .chart-container h3 { margin-bottom: 20px; } .table-container { width: 100%; margin-top: 30px; overflow-x: auto; } caption { font-size: 1.1em; font-weight: bold; color: var(–primary-color); margin-bottom: 15px; text-align: center; } table { width: 100%; border-collapse: collapse; margin-top: 15px; box-shadow: 0 2px 5px var(–shadow-color); } th, td { padding: 12px 15px; text-align: left; border: 1px solid #ddd; } thead { background-color: var(–primary-color); color: var(–white); } tbody tr:nth-child(even) { background-color: #f2f2f2; } tbody tr:hover { background-color: #e9ecef; } .article-content { width: 100%; margin-top: 40px; background-color: var(–white); padding: 30px; border-radius: 8px; box-shadow: 0 2px 10px var(–shadow-color); text-align: left; } .article-content h2 { text-align: left; margin-top: 2rem; border-bottom: 2px solid var(–primary-color); padding-bottom: 5px; } .article-content h3 { text-align: left; margin-top: 1.5rem; color: #0056b3; } .article-content p, .article-content ul, .article-content ol { margin-bottom: 1.5rem; font-size: 1.05em; } .article-content ul, .article-content ol { padding-left: 30px; } .article-content li { margin-bottom: 0.8rem; } .article-content strong { color: var(–primary-color); } .article-content a { color: var(–primary-color); text-decoration: none; font-weight: bold; } .article-content a:hover { text-decoration: underline; } .faq-section { margin-top: 20px; border: 1px solid #eee; border-radius: 5px; padding: 15px; } .faq-section h3 { text-align: left; margin-bottom: 15px; border-bottom: none; color: #0056b3; } .faq-item { margin-bottom: 15px; } .faq-item-question { font-weight: bold; color: var(–primary-color); cursor: pointer; display: block; position: relative; padding-left: 25px; } .faq-item-question::before { content: '+'; position: absolute; left: 5px; font-size: 1.2em; color: var(–primary-color); } .faq-item-answer { display: none; margin-top: 10px; padding-left: 20px; font-size: 0.95em; color: #555; } .faq-item.open .faq-item-question::before { content: '-'; } .faq-item.open .faq-item-answer { display: block; } #internalLinksList { list-style: none; padding: 0; } #internalLinksList li { margin-bottom: 10px; } #internalLinksList a { font-weight: bold; } #internalLinksList span { font-size: 0.9em; color: #666; margin-left: 10px; } footer { text-align: center; margin-top: 40px; padding: 20px; font-size: 0.9em; color: #777; }

Ring Size Calculator Based on Height and Weight

Estimate your ring size accurately using your physical measurements.

Ring Size Estimator

Enter your height in centimeters (cm).
Enter your weight in kilograms (kg).
Female Male Select your gender for more tailored estimation.

Your Estimated Ring Size

BMI

Finger Length (cm)

Finger Circumference (mm)

Formula Basis: This calculator uses a complex algorithm that correlates height and weight (via BMI) with typical finger circumferences and lengths observed in populations. It then maps these to standard ring sizes. Note: This is an estimation and may not be perfectly accurate for everyone.

Ring Size vs. BMI Range

Illustrative distribution of estimated ring sizes across different BMI ranges for males and females.

Typical Ring Size Data
BMI Category Estimated Circumference (mm) Estimated Ring Size (US)
Underweight 45-52 3-5
Normal Weight 52-58 5-7
Overweight 58-64 7-9
Obese 64+ 9+

What is a Ring Size Calculator Based on Height and Weight?

A ring size calculator based on height and weight is a digital tool designed to provide an *estimated* ring size by leveraging correlations between a person's overall body dimensions and typical finger circumference. While not as precise as physically measuring a finger, this type of calculator offers a convenient starting point, especially when you cannot directly measure or try on rings. It's particularly useful for surprise gifts or when you're trying to gauge your own size without immediate access to a ring sizer. The underlying principle is that body mass and height can influence bone structure and finger size, creating a general statistical relationship.

Who should use it:

  • Individuals looking for a quick, approximate ring size for themselves or as a gift.
  • People who want a baseline estimate before visiting a jeweler.
  • Those curious about how physical attributes might relate to finger size.

Common misconceptions:

  • Perfect Accuracy: This calculator provides an estimate, not a definitive size. Individual bone structure, genetics, and other factors play a significant role.
  • Universal Formula: The correlation between height, weight, and finger size varies across populations and genders. This tool uses generalized data.
  • Finger Dominance: The dominant hand's fingers are often slightly larger than the non-dominant hand's. This calculator provides a single estimate.

Ring Size Calculator Based on Height and Weight: Formula and Mathematical Explanation

The calculation for a ring size calculator based on height and weight is not a single, universally agreed-upon formula but rather an algorithmic estimation based on established biometric data and statistical correlations. Here's a breakdown of the common steps and variables involved:

Core Calculation Steps:

  1. Calculate Body Mass Index (BMI): This is the first crucial step, as BMI provides a normalized measure of body size based on height and weight.
  2. Correlate BMI to Finger Circumference: Based on statistical data, a general relationship is established between BMI ranges and typical finger circumferences. This is where gender often becomes a factor, as average finger sizes can differ.
  3. Convert Circumference to Ring Size: The calculated finger circumference is then converted into a standard ring size (e.g., US, UK, EU).

Variable Explanations:

  • Height (H): The vertical distance from the bottom of the feet to the top of the head.
  • Weight (W): The total mass of the body.
  • BMI: A ratio of weight to height, used to categorize weight status. Calculated as Weight (kg) / (Height (m) * Height (m)).
  • Gender: Biological sex, used to adjust correlation factors, as average finger sizes and body compositions differ.
  • Finger Circumference (C): The total distance around the finger at the knuckle or base, measured in millimeters.
  • Ring Size (S): The standardized numerical or alphabetical designation for a ring that fits snugly around a finger.

Variables Table:

Key Variables in Ring Size Estimation
Variable Meaning Unit Typical Range (General Population)
Height Vertical body measurement cm (or m for BMI) 140 – 200 cm
Weight Body mass kg 40 – 120 kg
BMI Body Mass Index kg/m² 15 – 40 (Commonly 18.5 – 30)
Finger Circumference Measurement around the finger mm 45 – 75 mm
Ring Size (US) Standard US ring sizing Numerical (e.g., 3-13) 3 – 13

The algorithm internally uses empirically derived formulas and lookup tables to map BMI and gender to approximate finger circumferences and then to standardized ring sizes. For instance, a simplified conceptual mapping might look like:

Estimated Circumference = Base_Circumference(Gender) + (BMI - Average_BMI(Gender)) * Sensitivity_Factor

This estimated circumference is then converted to a ring size. The specific constants and sensitivity factors are proprietary to the model used by the calculator.

Practical Examples (Real-World Use Cases)

Let's explore how the ring size calculator based on height and weight works with a couple of scenarios:

Example 1: Sarah, a Moderately Tall Individual

  • Inputs:
    • Height: 168 cm
    • Weight: 62 kg
    • Gender: Female
  • Calculation Steps:
    • Height in meters: 1.68 m
    • BMI: 62 / (1.68 * 1.68) = 21.98 (Normal Weight)
    • The calculator's algorithm, using female-specific correlations for a BMI of 21.98, estimates a finger circumference of approximately 54 mm.
    • This circumference typically corresponds to a US ring size of 6.5.
  • Outputs:
    • Estimated Ring Size: 6.5 US
    • BMI: 22.0
    • Finger Length: (Estimated based on height) ~7.0 cm
    • Finger Circumference: ~54 mm
  • Interpretation: Sarah falls within a healthy BMI range, and the calculator suggests a common ring size for women of her build. This is a good starting point if she's looking for a ring.

Example 2: David, a Taller Individual with Higher Weight

  • Inputs:
    • Height: 185 cm
    • Weight: 95 kg
    • Gender: Male
  • Calculation Steps:
    • Height in meters: 1.85 m
    • BMI: 95 / (1.85 * 1.85) = 27.75 (Overweight)
    • The algorithm, using male-specific correlations for a BMI of 27.75, estimates a finger circumference of approximately 63 mm.
    • This circumference generally aligns with a US ring size of 9.
  • Outputs:
    • Estimated Ring Size: 9 US
    • BMI: 27.8
    • Finger Length: (Estimated based on height) ~7.8 cm
    • Finger Circumference: ~63 mm
  • Interpretation: David's BMI indicates he is in the overweight category. The calculator suggests a larger ring size, which is statistically probable given his height and weight. He might want to confirm this size with a physical measurement, especially if considering a significant purchase.

How to Use This Ring Size Calculator Based on Height and Weight

Using our ring size calculator based on height and weight is straightforward and designed for quick estimation. Follow these steps:

  1. Enter Height: Input your height in centimeters (cm) into the "Height" field. For example, if you are 5 feet 9 inches tall, that's approximately 175 cm.
  2. Enter Weight: Input your current weight in kilograms (kg) into the "Weight" field. For example, 75 kg.
  3. Select Gender: Choose "Female" or "Male" from the dropdown menu. This helps refine the estimation as average finger sizes can differ.
  4. Calculate: Click the "Calculate Ring Size" button.
  5. View Results: The calculator will immediately display:
    • Primary Estimated Ring Size (US): The main highlighted result.
    • Intermediate Values: Your calculated BMI, estimated finger length, and estimated finger circumference.
    • Formula Explanation: A brief note on the basis of the calculation.

How to Read Results:

  • The Primary Estimated Ring Size is your best guess based on the inputs.
  • The BMI gives context to your overall weight category.
  • Finger Circumference is the direct measurement the ring size is derived from.
  • Finger Length is an additional biometric estimate.

Decision-Making Guidance:

  • Gift Giving: If using this for a gift, this estimate is a good starting point. However, try to discreetly find out the recipient's actual ring size if possible (borrow a ring they wear, or ask a close friend/family member).
  • Personal Purchase: Use this as an initial guide. If the estimated size seems plausible, consider confirming it by visiting a local jeweler for a precise measurement before ordering an expensive ring.
  • Uncertainty: If your calculated size falls between two standard sizes, or if you are unsure, it's often safer to size up slightly, as rings can sometimes be made smaller, but adding metal is more complex.
  • Reset: Use the "Reset" button to clear all fields and start over with new measurements.

Key Factors That Affect Ring Size Results

While a ring size calculator based on height and weight provides a useful estimate, several factors can influence the accuracy and the actual ring size needed. Understanding these is crucial:

  1. Genetics and Bone Structure: Some individuals naturally have larger or smaller hands and fingers relative to their height and weight due to inherited traits. This calculator cannot account for unique skeletal structures.
  2. Age: Finger size can change slightly over time. Joints may become more arthritic and larger, or weight fluctuations can alter circumference. This tool provides a snapshot based on current measurements.
  3. Temperature and Time of Day: Fingers can swell in warm weather or later in the day and shrink in cold weather or in the morning. It's best to measure when fingers are at a normal temperature.
  4. Hormonal Changes: Fluctuations in hormones (e.g., during pregnancy, menopause, or due to certain medical conditions) can cause temporary or permanent changes in finger size.
  5. Activity Level and Diet: High salt intake can lead to water retention and temporary swelling of fingers. Intense physical activity can sometimes lead to slightly larger hands.
  6. Dominant Hand Size: The fingers on your dominant hand are typically slightly larger than those on your non-dominant hand due to increased muscle and bone use. This calculator provides a single estimate, usually assumed for the non-dominant hand for broader applicability or a general average.
  7. Specific Finger: The calculator estimates a general size. Different fingers on the same hand (e.g., index vs. ring finger) will have different circumferences. Ensure you know which finger you intend to wear the ring on.
  8. Knuckle Size: If your knuckles are significantly larger than the base of your finger, you need to ensure the ring can pass over the knuckle. Measurements should account for this, often by measuring the knuckle itself or ensuring the ring fits snugly past it.

Frequently Asked Questions (FAQ)

How accurate is a ring size calculator based on height and weight?
It's an estimation tool. While it uses statistical correlations, individual variations mean it's not perfectly accurate. It's best used as a starting point or for casual estimations.
Can I use this calculator for children?
This calculator is primarily designed for adults. Children's finger sizes can change rapidly and vary greatly. It's recommended to use a direct measurement for children.
What is BMI and why is it used?
BMI (Body Mass Index) is a ratio of weight to height used to broadly categorize weight status. It helps normalize the relationship between these two measurements, providing a basis for correlating body size with typical finger measurements.
Does gender significantly impact the estimated ring size?
Yes, gender is a factor because, on average, men and women tend to have different finger sizes and bone structures even at similar heights and weights. The calculator adjusts its correlations based on the selected gender.
What's the difference between finger circumference and ring size?
Finger circumference is the actual measurement around your finger in millimeters. Ring size is a standardized numerical or alphabetical designation that corresponds to a specific circumference (and inner diameter) for fitting purposes.
How can I get a more precise ring size measurement?
The most accurate way is to visit a local jeweler who has professional ring sizers. Alternatively, you can use a printable ring sizer chart or measure your finger circumference with a string and ruler, ensuring it's snug but comfortable.
What should I do if my calculated size seems unusual?
If the calculated size seems significantly different from what you expect, it's highly recommended to get a physical measurement. Factors like specific bone structure or unusual weight distribution might not be captured by this general estimation.
Can I use this calculator for different ring types (e.g., wide bands vs. thin bands)?
This calculator estimates a standard ring size. Wider bands (e.g., over 6mm) tend to fit tighter, so you might need to go up a quarter to half size for comfort. Thin bands might fit true to size. Always consider band width when ordering.

© 2023 Your Company Name. All rights reserved.

var heightInput = document.getElementById('heightCm'); var weightInput = document.getElementById('weightKg'); var genderSelect = document.getElementById('gender'); var primaryResultDiv = document.getElementById('primaryResult'); var bmiResultDiv = document.getElementById('intermediateBodyMassIndex').getElementsByTagName('span')[0]; var fingerLengthResultDiv = document.getElementById('intermediateFingerLength').getElementsByTagName('span')[0]; var fingerCircumferenceResultDiv = document.getElementById('intermediateFingerCircumference').getElementsByTagName('span')[0]; var heightErrorDiv = document.getElementById('heightCmError'); var weightErrorDiv = document.getElementById('weightKgError'); var canvas = document.getElementById('bmiRingSizeChart'); var chartInstance = null; var maleBMIData = [ { bmi: 18.5, circumference: 52, size: 5.5 }, { bmi: 22, circumference: 56, size: 7 }, { bmi: 25, circumference: 60, size: 8.5 }, { bmi: 27, circumference: 62, size: 9.5 }, { bmi: 30, circumference: 65, size: 10.5 }, { bmi: 35, circumference: 69, size: 12 } ]; var femaleBMIData = [ { bmi: 18.5, circumference: 48, size: 4 }, { bmi: 22, circumference: 52, size: 5.5 }, { bmi: 25, circumference: 56, size: 7 }, { bmi: 27, circumference: 59, size: 8 }, { bmi: 30, circumference: 62, size: 9 }, { bmi: 35, circumference: 66, size: 10.5 } ]; function validateInput(value, min, max, errorElementId, inputName) { var errorElement = document.getElementById(errorElementId); if (value === null || value === ") { errorElement.textContent = inputName + ' cannot be empty.'; errorElement.style.display = 'block'; return false; } var numValue = parseFloat(value); if (isNaN(numValue)) { errorElement.textContent = inputName + ' must be a number.'; errorElement.style.display = 'block'; return false; } if (numValue max) { errorElement.textContent = inputName + ' must be between ' + min + ' and ' + max + '.'; errorElement.style.display = 'block'; return false; } errorElement.textContent = "; errorElement.style.display = 'none'; return true; } function calculateRingSize() { var heightCm = parseFloat(heightInput.value); var weightKg = parseFloat(weightInput.value); var gender = genderSelect.value; var validHeight = validateInput(heightInput.value, 100, 250, 'heightCmError', 'Height'); var validWeight = validateInput(weightInput.value, 20, 500, 'weightKgError', 'Weight'); if (!validHeight || !validWeight) { primaryResultDiv.textContent = '–'; bmiResultDiv.textContent = '–'; fingerLengthResultDiv.textContent = '–'; fingerCircumferenceResultDiv.textContent = '–'; updateChart([]); return; } var heightM = heightCm / 100; var bmi = weightKg / (heightM * heightM); bmi = parseFloat(bmi.toFixed(1)); var dataSet = (gender === 'male') ? maleBMIData : femaleBMIData; var estimatedCircumferenceMm = 50; // Default for very low BMI var estimatedRingSizeUs = 'N/A'; // Interpolate for circumference if (bmi = dataSet[dataSet.length – 1].bmi) { estimatedCircumferenceMm = dataSet[dataSet.length – 1].circumference; } else { for (var i = 0; i = dataSet[i].bmi && bmi <= dataSet[i + 1].bmi) { var percentage = (bmi – dataSet[i].bmi) / (dataSet[i + 1].bmi – dataSet[i].bmi); estimatedCircumferenceMm = dataSet[i].circumference + percentage * (dataSet[i + 1].circumference – dataSet[i].circumference); break; } } } estimatedCircumferenceMm = parseFloat(estimatedCircumferenceMm.toFixed(1)); // Map circumference to US ring size (approximate common bands) if (estimatedCircumferenceMm < 48) estimatedRingSizeUs = '3'; else if (estimatedCircumferenceMm < 51.5) estimatedRingSizeUs = '4'; else if (estimatedCircumferenceMm < 53.4) estimatedRingSizeUs = '5'; else if (estimatedCircumferenceMm < 55.3) estimatedRingSizeUs = '6'; else if (estimatedCircumferenceMm < 57.2) estimatedRingSizeUs = '7'; else if (estimatedCircumferenceMm < 59.1) estimatedRingSizeUs = '8'; else if (estimatedCircumferenceMm < 61.1) estimatedRingSizeUs = '9'; else if (estimatedCircumferenceMm < 63.0) estimatedRingSizeUs = '10'; else if (estimatedCircumferenceMm < 65.0) estimatedRingSizeUs = '11'; else if (estimatedCircumferenceMm < 67.0) estimatedRingSizeUs = '12'; else estimatedRingSizeUs = '13+'; // Estimate Finger Length (very rough correlation) var estimatedFingerLengthCm = 5.0 + (heightCm – 150) * 0.03; estimatedFingerLengthCm = parseFloat(estimatedFingerLengthCm.toFixed(1)); if (estimatedFingerLengthCm 9.0) estimatedFingerLengthCm = 9.0; primaryResultDiv.textContent = estimatedRingSizeUs + ' US'; bmiResultDiv.textContent = bmi; fingerLengthResultDiv.textContent = estimatedFingerLengthCm + ' cm'; fingerCircumferenceResultDiv.textContent = estimatedCircumferenceMm + ' mm'; updateChart(dataSet); } function resetCalculator() { heightInput.value = '170'; weightInput.value = '70'; genderSelect.value = 'female'; primaryResultDiv.textContent = '–'; bmiResultDiv.textContent = '–'; fingerLengthResultDiv.textContent = '–'; fingerCircumferenceResultDiv.textContent = '–'; heightErrorDiv.textContent = "; heightErrorDiv.style.display = 'none'; weightErrorDiv.textContent = "; weightErrorDiv.style.display = 'none'; calculateRingSize(); // Recalculate with default values } function updateChart(data) { var labels = data.map(function(item) { return item.bmi + ' BMI'; }); var circumferences = data.map(function(item) { return item.circumference; }); var sizes = data.map(function(item) { return item.size; }); var genderLabel = genderSelect.value === 'male' ? 'Male' : 'Female'; if (chartInstance) { chartInstance.destroy(); } if (canvas.getContext) { var ctx = canvas.getContext('2d'); chartInstance = new Chart(ctx, { type: 'line', data: { labels: labels, datasets: [{ label: 'Estimated Circumference (mm) – ' + genderLabel, data: circumferences, borderColor: 'rgb(75, 192, 192)', tension: 0.1, fill: false, yAxisID: 'y1' }, { label: 'Estimated Ring Size (US)', data: sizes, borderColor: 'rgb(255, 99, 132)', tension: 0.1, fill: false, yAxisID: 'y2' }] }, options: { responsive: true, maintainAspectRatio: true, scales: { x: { title: { display: true, text: 'BMI Range' } }, y1: { type: 'linear', position: 'left', title: { display: true, text: 'Circumference (mm)' }, ticks: { beginAtZero: false } }, y2: { type: 'linear', position: 'right', title: { display: true, text: 'Ring Size (US)' }, ticks: { beginAtZero: true, stepSize: 1 } } }, plugins: { legend: { display: true, position: 'top' }, title: { display: true, text: 'Estimated Ring Size & Circumference vs. BMI' } } } }); } } document.addEventListener('DOMContentLoaded', function() { // Initial calculation on load with default values calculateRingSize(); // Add event listeners for real-time updates heightInput.addEventListener('input', calculateRingSize); weightInput.addEventListener('input', calculateRingSize); genderSelect.addEventListener('change', calculateRingSize); // FAQ toggle functionality var faqItems = document.querySelectorAll('.faq-item-question'); faqItems.forEach(function(item) { item.addEventListener('click', function() { var parent = this.parentElement; parent.classList.toggle('open'); }); }); });

Leave a Comment