【问题标题】:Fullpage.js custom navigation in WordPress using Elementor Pro and OceanWP Full Page使用 Elementor Pro 和 OceanWP Full Page 在 WordPress 中的 Fullpage.js 自定义导航
【发布时间】:2019-06-07 04:47:10
【问题描述】:

我正在尝试使用网站上的两个图像为 fullscreen.js 组合自定义导航,我使用 Elementor Pro 和 OceanWP 组合成一个不错的单页网站。

我目前正在使用这两个图像作为链接来移动到不同的部分,但我希望它们具有粘性并在网站上导航,而不必在每张幻灯片上复制它们。

我已尝试使用以下question,但无法通过使用 HTML 小部件或自定义 JavaScript 插件使代码正常工作。有人能指出我正确的方向吗?

【问题讨论】:

    标签: wordpress fullpage.js elementor


    【解决方案1】:

    这是我为解决这个问题所做的:

    1. 在 Elementor 中为我想用作按钮的图像提供 css-id (Previous_Button 和 Next_Button)
    2. 使用 Elementor 在页面上放置一个 HTML 小部件
    3. 在 HTML Widget 中放置以下代码:

      <script>
      (function($) {
      $('#Next_Button').click(function(){
          fullpage_api.moveSectionDown();
          });
      
      
      $('#Previous_Button').click(function(){
          fullpage_api.moveSectionUp();
          });
      })(jQuery);
      </script>
      

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-15
      • 2014-02-26
      • 1970-01-01
      相关资源
      最近更新 更多