Trigger popup via menu

I would like to trigger a popup via a menu item.

I gather this could be achieved by making the popup triggerable by a CSS ID in the menu or somehow triggering a bricks interaction via the menu.
Or some other way.
Unfortunately I am too much of a noob to work it out on my own.

I guess I could add a button next to the menu but I really would like it to be IN the menu as can be seen in the header on opojob.com

This has been asked previously here:

but does not appear to have been answered.

Any help would be greatly appreciated.

Hi Baba

You can trigger the Popup via JavaScript:

// Open Popup ID 3321 if any element with .brxe-heading or .my-custom-selector class
document.querySelectorAll('.brxe-heading, .my-custom-selector').forEach( (el) => {
	el.addEventListener('click', () => {
		bricksOpenPopup(3321)
	})
})

Cheers

Patric

2 Likes

Took me a while to work out what the popup id was. Needed to post the script in the footer because it did some weird stuff with my logo. But:

It totally works now.

I owe you a beer.

1 Like