高级轮播不可见,下拉按钮不见了

时间:2019-05-16 19:52:01

标签: javascript css wordpress wordpress-theming carousel

WP /插件/主题更新中断了我们网站的“选择校园”按钮。它是一个按钮,用于放下以前隐藏的水平滚动的校园图像轮播。 单击一个将您重定向。它位于主题的自定义js中,因此它是整个站点的标头。该轮播称为“高级轮播”,它是通过“用于WPBakery的最终附件”构建的

对不起,我几乎没有网络经验,在有人破坏了我的网站后,我才移交给了该网站。我正在努力学习尽可能多的东西。除此部分外,其他所有内容现在都可以使用。

这是针对新近更新的WP网站,该网站多年未更新。当WP本身进行更新时,它破坏了所有站点,这是以前人们所能做到的。我更新了插件和主题,并修复了该轮播以外的大多数问题。

这是自定义JS,它是主题的一部分(应该应用于我相信的每个网站的标头)。

jQuery(document).ready(function($){
$('.select-campus a').on('click', function(e) {
            e.preventDefault();
            $(this).toggleClass('active');
            $('#select-a-campus').toggleClass('active');                  
        });
});
(function (n) { n.fn.sticky = function (t) { var i = n.extend({}, { 
topSpacing: 0, bottomSpacing: 0, debug: !1 }, t), r = function (t, r, u) { var o = u.offset(), e = n(window).scrollTop(), f = n(document).outerHeight() - i.bottomSpacing - i.topSpacing - t.outerHeight(); f <= 0 || t.height() <= 0 || (e > o.top - i.topSpacing && e < f ? (t.css("position") != "fixed" && (t.trigger("sticky-start"), t.css({ position: "fixed", top: i.topSpacing })), t.trigger("sticky-bottom-unreached")) : e > o.top - i.topSpacing && e >= f ? t.css("position") == "fixed" ? (t.trigger("sticky-bottom-reached"), t.css({ position: "absolute", top: f - r.offset().top + i.topSpacing + "px" })) : t.css("position") == "absolute" ? t.css({ top: f - r.offset().top + i.topSpacing + "px" }) : f > o.top && t.css({ position: "absolute", top: f - r.offset().top + i.topSpacing + "px" }) : ((t.css("position") == "fixed" || t.css("position") == "absolute") && t.trigger("sticky-end"), t.css({ position: "", top: "" }))) }; return this.each(function () { var t = n(this), u = t.offsetParent(), i; t.width(t.width()); i = n("<div class='sticky-holder' style='visibility: hidden;height:0;display:block'><\/div>").insertBefore(t); r(t, u, i); n(window).scroll(function () { r(t, u, i) }) }) } })(jQuery);

 jQuery(document).ready(function ($) { 
      $('.vc_custom_1489943500023, .vc_custom_1489936456809').sticky( {topSpacing: 20,bottomSpacing:$("#page-section-40").outerHeight(true)} );
    });

function myFunction() {
document.getElementById("myDropdown").classList.toggle("show");
}

// Close the dropdown menu if the user clicks outside of it
window.onclick = function(event) {
  if (!event.target.matches('.dropbtn')) {

var dropdowns = document.getElementsByClassName("dropdown-content");
var i;
for (i = 0; i < dropdowns.length; i++) {
  var openDropdown = dropdowns[i];
  if (openDropdown.classList.contains('show')) {
    openDropdown.classList.remove('show');
      }
    }
  }
}

请告诉我是否有其他办法可以帮助您理解。对不起,我不知道更多。任何帮助表示赞赏。

没有错误消息,但是,如果将鼠标悬停在标题下方的几个像素内,则可以单击一些隐藏的园区。

编辑1:这是html https://github.com/dtnieboer/sh-html/releases/tag/1.0

的链接

编辑2:大家好!更新-是的,根据我的技能水平,这项工作太困难了。现在要摆脱旧代码并重建一个更简单的按钮。感谢您的帮助!

0 个答案:

没有答案