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

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:

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:

Hi Max,

This is perfect!

Thank you so much.

Cory

It’s my pleasure!

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

Hey @Max

I attempted to do this on my job board widget, but it was not successful after adding my Widget ID. Could you assist? Website is Jobs — Attollo Prep

Hi there, @Alex_Shepler :waving_hand:

Custom JS codes don’t work in the preview mode, that’s why the changes are not visible in the editor.

However, I’ve checked your website and see that the code worked fine:


Could you please double-check it?