[Job Board] Move the close icon inside of the popup

2 Likes

Hi there, @Cory_Borman :waving_hand:

Your request is with our devs now. I’ll report back once I have any news :slightly_smiling_face:

1 Like

We’ve added this code to the Custom JS field on the Settings tab of your widget’s settings:

const WIDGET_ID = '3c159414-da25-4446-b8ca-58d10661f16a';

function moveCloseButton() {
	const popupWrapper = document.body.querySelector(
		`#__EAAPS_PORTAL[class*="eapps-job-board-${WIDGET_ID}"]`
	);

	if (!popupWrapper) {
		requestAnimationFrame(moveCloseButton);

		return;
	}

	const popupObserver = new MutationObserver(() => {
		const closeButton = popupWrapper.querySelector(
			'[class*="Popup__PopupCloseOutside-sc"]'
		);
		const popup = popupWrapper.querySelector(
			'[class*="Popup__PopupContent-sc"]'
		);

		if (!popup || !closeButton) return;

		popup.appendChild(closeButton);
	});

	popupObserver.observe(popupWrapper, {
		childList: true,
	});
}

moveCloseButton();

If you want to use this functionality in another Job Board widgets, just replace the Widget ID in the 1st line of the code with the ID of your widget:


Please check your website and let me know if you like the result :slightly_smiling_face:

2 Likes

Hi Max,

This is perfect!

Thank you so much.

Cory

3 Likes

It’s my pleasure!

If anything else comes up, we’re always here to help :wink:

1 Like