NYCityWeddings Blog

Explore wedding planning ideas, inspiration and advice from our shared wedding community.

A Beautiful Bride's Editorial hair and makeup!

A Beautiful Bride's Editorial hair and makeup!

November 19, 2015

Visit http://www.ecomakeupartist.com/ { const token = document.querySelector('meta[name="csrf-token"]').content; const headers = {'Content-Type': 'application/json', 'X-CSRF-TOKEN': token, 'Accept': 'application/json'}; const exposureData = [...document.querySelectorAll('.exposure')].map((element) => ({ type: element.dataset.type, id: Number(element.dataset.id), })); if (exposureData.length > 0) { fetch('https:\/\/www.nycityweddings.com\/legacy-stats\/view', { method: 'POST', headers, body: JSON.stringify({view_data: exposureData}), keepalive: true, }).catch(() => {}); } document.addEventListener('click', (event) => { const trackedLink = event.target.closest('.track'); if (!trackedLink) { return; } fetch('https:\/\/www.nycityweddings.com\/legacy-stats\/click', { method: 'POST', headers, body: JSON.stringify({ type: trackedLink.dataset.type, id: Number(trackedLink.dataset.id), }), keepalive: true, }).catch(() => {}); }); window.bindLegacyFallbackImages = (root = document) => { root.querySelectorAll('img[data-fallback-src]:not([data-fallback-bound])').forEach((image) => { image.dataset.fallbackBound = 'true'; const useFallback = () => { if (image.dataset.fallbackSrc && image.src !== image.dataset.fallbackSrc) { image.src = image.dataset.fallbackSrc; } }; image.addEventListener('error', useFallback, {once: true}); if (image.getAttribute('src') && image.complete && image.naturalWidth === 0) { useFallback(); } }); }; window.bindLegacyFallbackImages(); const search = document.querySelector('.searchBox'); const searchToggle = document.querySelector('.searchIcon button'); const searchClose = document.querySelector('.close-srch'); const searchHints = ["wedding venues","wedding photographers","wedding DJs","wedding flowers","outdoor wedding venues","waterfront wedding venues","fall wedding ideas","wedding planning checklist"]; let lastSearchHint = ''; try { lastSearchHint = sessionStorage.getItem('liw-search-hint') || ''; } catch {} const refreshSearchHint = (input) => { if (!input || input.value || document.activeElement === input) return; const fittingHints = searchHints.filter(hint => window.innerWidth > 650 || [...hint].length <= 25); const available = fittingHints.length ? fittingHints : searchHints; const choices = available.filter(hint => hint !== lastSearchHint); const pool = choices.length ? choices : available; if (!pool.length) return; const random = globalThis.crypto?.getRandomValues ? crypto.getRandomValues(new Uint32Array(1))[0] / 4294967296 : Math.random(); lastSearchHint = pool[Math.floor(random * pool.length)]; input.placeholder = `Try “${lastSearchHint}”`; try { sessionStorage.setItem('liw-search-hint',lastSearchHint); } catch {} }; document.querySelectorAll('[data-search-hint-input]').forEach(refreshSearchHint); const setSearchOpen = (open) => { search.hidden = !open; searchToggle.setAttribute('aria-expanded', open ? 'true' : 'false'); if (open) { refreshSearchHint(search.querySelector('input')); search.querySelector('input').focus(); } }; searchToggle.addEventListener('click', () => setSearchOpen(true)); searchClose.addEventListener('click', () => setSearchOpen(false)); const menu = document.querySelector('.nav'); const menuToggle = document.querySelector('.mobmenu'); const menuClose = document.querySelector('.Nav-close'); const setMenuOpen = (open) => { menu.classList.toggle('is-open', open); menuToggle.setAttribute('aria-expanded', open ? 'true' : 'false'); }; menuToggle.addEventListener('click', () => setMenuOpen(true)); menuClose.addEventListener('click', () => setMenuOpen(false)); document.addEventListener('pointerdown', event => { if (!menu.contains(event.target) && !menuToggle.contains(event.target)) setMenuOpen(false); }); document.addEventListener('keydown', event => { if (event.key !== 'Escape') return; if (menu.classList.contains('is-open')) { setMenuOpen(false); menuToggle.focus(); } if (!search.hidden) { setSearchOpen(false); searchToggle.focus(); } }); });