微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

滑块的自定义JS和CSS仅适用于“ admin”,我需要它适用于所有用户公共用户+ admin

如何解决滑块的自定义JS和CSS仅适用于“ admin”,我需要它适用于所有用户公共用户+ admin

添加了用于添加滑块的自定义JS和CSS文件,但仅对我(管理员)有效,不适用于公共用户。我通过自定义脚本插件添加了它们。这是JS和CSS代码

我希望它适用于所有用户

jQuery(document).ready(function( $ ){
      jQuery(".post_slide .elementor-container ").addClass("swiper-container");
  jQuery(".post_slide .elementor-row ").addClass("swiper-wrapper");
    jQuery(".post_slide .elementor-column").addClass("swiper-slide");
  jQuery('.swiper-container').append('<div class="swiper-pagination"></div><div class="swiper-button-prev"></div><div class="swiper-button-next"></div>'); 
  
    var swiper = new Swiper('.swiper-container',{
          spaceBetween: 0,slidesPerView: 1,speed: 400,autoplay:true,breakpoints: {
            
            640: {
              slidesPerView: 1,spaceBetween: 0,},768: {
              slidesPerView: 1,1024: {
              slidesPerView: 1,navigation: {
            nextEl: '.swiper-button-next',prevEl: '.swiper-button-prev',});
  
  });
.swiper-wrapper {
    display: flex !important;
    flex-wrap: inherit;
  }

解决方法

我已经更改了自定义文件的位置:

  • 页面上的位置=>页脚

现在可以了!!

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。