Help with maps plugin CSS styling

Hi there,

Sorry it took me a while to get back to you.

The reason this is happening, is that the link on the forms page (<a href="#contactus">Contact us</a>) is being added via AJAX, after the event handlers have been attached on your main page.

To account for this, use event delegation. This basically involves attaching the event to an element that is present when the DOM is rendered (for example div#container in your case), then whenever that registers a click, check if it came from an anchor tag with the class of “menuitem”.

$(".menuitem").on("click", function(e) {

becomes:

$("#container").on("click", ".menuitem", function(e) {

and you have to give your contact link a class of “menuitem”

<a href="#contactus" class="menuitem">Contact us</a>

Here’s a demo of it working.