You have a script running that scrolls to the destination of #anchors and that is taking away the target.
In core.js:
function USScroll(options) {
var defaults = {
attachOnInit: '.menu-item a[href*="#"], .menu-item[href*="#"], a.w-btn[href*="#"], .w-iconbox a[href*="#"], .w-image a[href*="#"], .w-img a[href*="#"], .w-text a[href*="#"], ' + '.vc_icon_element a[href*="#"], .vc_custom_heading a[href*="#"], a.w-grid-item-anchor[href*="#"], .w-toplink, ' + '.w-blogpost-meta-comments a[href*="#"], .w-comments-title a[href*="#"], .w-comments-item-date, a.smooth-scroll[href*="#"]',
buttonActiveClass: 'active',
menuItemActiveClass: 'current-menu-item',
menuItemAncestorActiveClass: 'current-menu-ancestor',
animationDuration: $us.canvasOptions.scrollDuration,
animationEasing: 'easeInOutExpo'
};
It looks as though you can remove the class of menu-item from the anchor itself and it should work.
e.g.
Use this HTML instead of what you have:
<li id="menu-item-461" class="menu-item-type-custom menu-item-object-custom menu-item-461"><a href="#target-content">Contact Pop up</a></li>
(All i did was remove the class of ‘menu-item’ from the list element and now it works)
However the popup doesn’t show properly to me and the use of pointer events is risky as you risk blocking all your page content with the overlay because it is actually present at all times. I would change the code at the bottom of the page to this:
#button {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translateX(-50%) translateY(-50%);
-ms-transform: translateX(-50%) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
padding: 16px 24px;
border-radius: 1px;
text-decoration: none;
font-size: 24px;
display: block;
color: white;
background-color: #34495E;
text-align: center;
font-weight: 100;
-webkit-transition: box-shadow 200ms;
transition: box-shadow 200ms;
border-radius: 4px;
}
#button:hover { box-shadow: 0px 12px 24px rgba(0, 0, 0, 0.2); }
/*
#target-content {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
pointer-events: none;
opacity: 0;
-webkit-transition: opacity 200ms;
transition: opacity 200ms;
}
#target-content:target {
pointer-events: all;
opacity: 1;
}
#target-content #target-inner {
position: absolute;
display: block;
padding: 48px;
line-height: 1.8;
max-width: 700px;
top: 50%;
left: 50%;
-webkit-transform: translateX(-50%) translateY(-50%);
-ms-transform: translateX(-50%) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
box-shadow: 0px 12px 24px rgba(0, 0, 0, 0.2);
background: white;
color: #34495E;
}
*/
#target-content {
position: fixed;
top:0;
left:0;
opacity: 0;
z-index:-1;
height:0;
width:0;
overflow:hidden;
-webkit-transition: opacity 200ms;
transition: opacity 200ms;
}
#target-content:target {
opacity: 1;
top: 0;
right: 0;
bottom: 0;
left: 0;
height:auto;
width:auto;
overflow:visible;
z-index:999;
}
#target-content #target-inner {
position: absolute;
overflow:auto;
display: block;
padding: 48px;
line-height: 1.8;
max-width: 700px;
max-height:100vh;
top: 50%;
left: 50%;
-webkit-transform: translateX(-50%) translateY(-50%);
-ms-transform: translateX(-50%) translateY(-50%);
transform: translateX(-50%) translateY(-50%);
box-shadow: 0px 12px 24px rgba(0, 0, 0, 0.2);
background: white;
color: #34495E;
}
#target-content #target-inner h2 { margin-top: 0; }
#target-content #target-inner code { font-weight: bold; }
#target-content a.close {
content: "";
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
background-color: #34495E;
opacity: 0.5;
-webkit-transition: opacity 200ms;
transition: opacity 200ms;
}
#target-content a.close:hover { opacity: 0.4; }
@media screen and (max-width:700px){
#target-content #target-inner {width:95%;}
}
That is a lot safer and won’t block content.
You also need to cater for mobile as the modal was not scrollable on mobile and didn’t fit and therefore inaccessible as fixed elements do not scroll and you could never complete the form. I added a media query to get you started and added scrollbars and a minimum of viewport height so that it never stretches out of the viewport. Fixed elements must always remain within the viewport because they cannot be scrolled to.
This took ages to sort out due to the layers of complexity in this design