facultyoffashion.com
International Size Converter
Convert clothing, footwear, and ring sizes across all countries instantly
Inches
Centimeters
Select a size to see conversions
Complete Conversion Chart
No size selected
'; const data = sizeData[currentCategory]; const originSizes = data.conversions[currentOrigin]; const sizeIndex = originSizes.findIndex(size => size.toString().toLowerCase() === inputSize.toLowerCase() ); if (sizeIndex === -1) return 'Invalid size
'; let content = `${categoryName}: ${origin} Size ${inputSize}
`;
Object.keys(data.conversions).forEach(country => {
const size = data.conversions[country][sizeIndex];
content += `
${country}: ${size}
`;
});
content += `${data.measurement}: ${measurement}" / ${metric} cm
`; } return content; }function generateShareableURL() { const params = new URLSearchParams(); params.set('category', currentCategory); params.set('origin', currentOrigin); params.set('size', document.getElementById('sizeInput').value); params.set('metric', isMetric ? '1' : '0'); return `${window.location.origin}${window.location.pathname}?${params.toString()}`; }function showNotification(message) { const notification = document.createElement('div'); notification.style.cssText = ` position: fixed; top: 20px; right: 20px; background: #4CAF50; color: white; padding: 15px 20px; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.2); z-index: 1000; font-weight: 600; `; notification.textContent = message; document.body.appendChild(notification); setTimeout(() => { notification.remove(); }, 3000); }// Load URL parameters on page load window.addEventListener('load', function() { const params = new URLSearchParams(window.location.search); if (params.get('category')) { document.getElementById('category').value = params.get('category'); currentCategory = params.get('category'); } if (params.get('origin')) { document.getElementById('originCountry').value = params.get('origin'); currentOrigin = params.get('origin'); } if (params.get('size')) { document.getElementById('sizeInput').value = params.get('size'); currentSize = params.get('size'); } if (params.get('metric') === '1') { isMetric = true; document.getElementById('unitToggle').classList.add('active'); } updateChart(); if (currentSize) { convertSize(); } });// Add some sample data for demonstration window.addEventListener('DOMContentLoaded', function() { // Add some helpful placeholder text const sizeInput = document.getElementById('sizeInput'); function updatePlaceholder() { const category = document.getElementById('category').value; const origin = document.getElementById('originCountry').value; if (category === 'womens-shoes' || category === 'mens-shoes') { sizeInput.placeholder = origin === 'US' ? 'e.g., 8, 8.5, 9' : origin === 'UK' ? 'e.g., 6, 6.5, 7' : origin === 'EU' ? 'e.g., 38, 39, 40' : origin === 'JP' ? 'e.g., 24, 25, 26' : 'Enter size'; } else if (category.includes('clothing')) { sizeInput.placeholder = origin === 'US' ? 'e.g., S, M, L, 8, 10' : origin === 'UK' ? 'e.g., 8, 10, 12' : origin === 'EU' ? 'e.g., 36, 38, 40' : 'Enter size'; } else if (category === 'rings') { sizeInput.placeholder = origin === 'US' ? 'e.g., 5, 6, 7' : origin === 'UK' ? 'e.g., J, K, L' : 'Enter size'; } } document.getElementById('category').addEventListener('change', updatePlaceholder); document.getElementById('originCountry').addEventListener('change', updatePlaceholder); updatePlaceholder(); });