dimsemenov / Magnific-Popup

Light and responsive lightbox script with focus on performance.
http://dimsemenov.com/plugins/magnific-popup/
MIT License
11.38k stars 3.49k forks source link

Ajax links not working with slashes #1114

Open Kleindberg opened 5 years ago

Kleindberg commented 5 years ago

Ajax links work perfectly if file located in root directory and there is no slashes in the path: <a href="privacy.html" class="ajax-link">...</a> but this construction: <a href="/privacy.html" class="ajax-link">...</a> ...not working. Is it bug or my error?

adwokatpawlak-lodz commented 5 years ago

The same here, Code [sorry I can't make enters work]: `

teacher at board
    <div id="modal-image-18" class="white-popup mfp-hide">
    <p>Teacher of Animation and 3d modelling atTeacher of Animation and 3d modelling atTeacher of Animation and 3d modelling atTeacher of Animation and 3d modelling atTeacher of Animation and 3d modelling atTeacher of Animation and 3d modelling at <a href="http://google.com">google_link</a> 
            </p>
  </div>

`

wraps whole paragraph <p> into<a class = modal-image" like this: Annotation 2019-09-12 084259

adwokatpawlak-lodz commented 5 years ago

OK I solved it but it probably wasn't your question: the working code is [damm enters] <a class="modal-image" href="#modal-image-18" > <img src="./img/MyProjects/Teacher.jpg" alt="teacher at board" /> </a><div id="modal-image-18" class="white-popup mfp-hide"> <p>Teacher of Animation and 3d modelling atTeacher of Animation and 3d modelling atTeacher of Animation and 3d modelling atTeacher of Animation and 3d modelling atTeacher of Animation and 3d modelling atTeacher of Animation and 3d modelling at <a href="http://google.com">google_link</a> </p> </div> so there was <a> link throughout the popup content, instead of <a class="modal-image" href="#modal-image-18" > open popup <div id="modal-image-18" class="white-popup mfp-hide"> popup content </div> </a>

it should be <a class="modal-image" href="#modal-image-18" > open popup </a> <div id="modal-image-18" class="white-popup mfp-hide"> popup content </div> this bug was hard to find because if there is no <a> link inside the popup content, it worked