找不到内容弹出错误

时间:2018-10-08 06:27:32

标签: popup magnific-popup

我的Magnific Popup无法正常工作,几个小时后,我仍然找不到解决方案。这是指向我的网站的链接:https://client-casamathilda.loveiscreative.com。进入网站后,应该会出现弹出窗口。

关于可能导致错误的原因的任何想法?

谢谢!

以下是代码段:

$(document).ready(function() {
  $(window).on('load', function() {
    var now, lastDatePopupShowed;
    now = new Date();

    if (localStorage.getItem('lastDatePopupShowed') !== null) {
      lastDatePopupShowed = new Date(parseInt(localStorage.getItem('lastDatePopupShowed')));
    }

    if (((now - lastDatePopupShowed) >= (15 * 86400000)) || !lastDatePopupShowed) {
      $.magnificPopup.open({
        items: {
          src: '#launch-popup'
        },
        type: 'inline'
      }, 0);

      localStorage.setItem('lastDatePopupShowed', now);
    }
  });
});
<div id="launch-popup" class="launch-popup mfp-hide mob-hide">
  <div class="bg-image padded-8" style="background-image:url({{site.data.pop-up.featured_image}});">

    {% if page.language == 'en' %}
    <h2> {{site.data.pop-up.title-en}} </h2>
    <p> {{site.data.pop-up.body-en}}</p>
    <div class="button-1 button-ochre align-center">
      <a href="#" target="_blank">Book Now<img src="/images/right-arrow.svg" alt="right arrow"></a>
    </div>

    {% elsif page.language == 'fr' %}
    <h2> {{site.data.pop-up.title-fr}} </h2>
    <p> {{site.data.pop-up.body-fr}}</p>
    <div class="button-1 button-ochre align-center">
      <a href="#" target="_blank">Réserver<img src="/images/right-arrow.svg" alt="right arrow"></a>
    </div>

    {% else %}
    <h2> {{site.data.pop-up.title-es}} </h2>
    <p> {{site.data.pop-up.body-es}}</p>
    <div class="button-1 button-ochre align-center">
      <a href="#" target="_blank">Reserva Ahora<img src="/images/right-arrow.svg" alt="right arrow"></a>
    </div>

    {% endif %}

  </div>
</div>

0 个答案:

没有答案