Magnific Popup stopped working

Permalink
Hello
I have problem with magnific popup for an enquiry form. It was working fine but has recently stopped working.

Here's the pagehttp://gotimetrekkers.com/gbg027-lost-monuments-peak-district...

The popup should come up when you click 'Make an Enquiry' (right hand side), but as you'll see it goes to a 404.

I think it's something to do with the href on the button link including gotimetrekkers.com rather than just .ccm-page.popup-enquiry-form...?

Any help appreciated.
Thanks

 
mnakalay replied on at Permalink Reply
mnakalay
the set up seems totally wrong as you pointed out. The class ccm-page shouldn't be anywhere there as that's the c5 core class for the page's wrapper.

But the biggest problem is you have several javascript errors on your page which makes jquery not recognized among other things. So the popup is probably not going to work anyway.
PJSAndo replied on at Permalink Reply
Strange as the same popup on the same page works for the google maps and thumbnail pictures...
mnakalay replied on at Permalink Best Answer Reply
mnakalay
it can happen depending on the code, the order of loading scripts...

In your case I think it all comes from a typo in your code. You have this code responsible for opening that enquiry form:
$(document).ready(function() {
   $('#openEnquiryForm').magnificPopup({
      type: 'inline',
      mainClass: 'mfp-fade',
        removalDelay: 160,
      preloader: false,
      focus: '#name',
      // When elemened is focused, some mobile browsers in some cases zoom in
      // It looks not nice, so we disable it:
      callbacks: {
         beforeOpen: function() {
            if($(window).width() < 700) {
               this.st.focus = false;
(
            } else {

just after "this.st.focus = false;" you have an extra bracket "(" that should be deleted. I think that's the source of all your problems.
PJSAndo replied on at Permalink Reply
Tremendous! That worked!

Not sure how that bracket git there...

Many thanks!

That'll be best answer then :)
mnakalay replied on at Permalink Reply
mnakalay
Thank you :)