`; // target the cover menu item const target = document.querySelector('#menu-header-uk-1 .menu-item-2911415'); // position popover to the left if the target is on the right half of the screen if (target.getBoundingClientRect().right > document.documentElement.clientWidth / 2) { popover.classList.add('left'); } target.appendChild(popover); // used to check if the article info let articleTitle = ''; // fetch info once, then show popover on hover target.addEventListener('mouseover', async () => { if (!articleTitle) { const [coverRes, articleRes] = await Promise.all([ fetch('https://www.nme.com/wp-json/wp/v2/posts?categories=268320&per_page=1&_fields[]=thumbnail_url&_fields[]=featured_media'), fetch('https://www.nme.com/wp-json/wp/v2/posts?categories=268101&per_page=1&_fields[]=title&_fields[]=link'), ]); const [cover, article] = await Promise.all([coverRes.json(), articleRes.json()]); articleTitle = article[0].title.rendered; document.querySelector('#the-cover-article-title').textContent = articleTitle; document.querySelector('#the-cover-article-title').href = article[0].link; document.querySelector('#the-cover-image-link').href = article[0].link; document.querySelector('#the-cover-read-now').href = article[0].link; document.querySelectorAll('#the-cover-image').forEach((img) => { // add size modifier to the cover image url img.src = cover[0].thumbnail_url.replace(/(\.[\w\d_-]+)$/i, '-400x500$1'); }); // document.querySelector('#the-cover-image-link').href = article[0].link; } setTimeout(() => popover.classList.add('active'), 0); }); // hide popover on mouse leave target.addEventListener('mouseleave', () => { setTimeout(() => popover.classList.remove('active'), 0); }); });

Tom Skinner

Grinderman to reissue full discography on eco-friendly vinyl and CD

The re-releases will arrive 20 years on from the Bad Seeds side-project's formation

Foreigner frontman Kelly Hansen quits band: “It’s time to pass the mic”

He has also confirmed his replacement in the line-up

Turnstile share epic seven-minute new single ‘Look Out For Me’

Their fourth album ‘Never Enough’ arrives next month

Glastonbury Festival 2025: See the full line-up and stage splits so far

Organisers are sharing separate posters for the many venues across Worthy Farm in the run-up to this year's event

Glastonbury 2025: See the full line-up for The Park

The Maccabees, Caribou and Anohni And The Johnsons are headlining, while the likes of Blur's Alex James, Confidence Man and Hot Chip will all DJ in the area

Primavera Sound Barcelona 2025: Wolf Alice replace Clairo on line-up

The band have returned with a massive new single, 'Bloom Baby Bloom'

The Black Keys announce “labour of love” new album ‘No Rain, No Flowers’ with breezy title track

The forthcoming LP is said to boast a "groove-driven, danceable vibe"

Watch Sugababes’ live cover of Lorde’s ‘What Was That’

The group played first Radio 1 Anthems Live Lounge yesterday (May 15)
Advertisement