Wordpress jQuery多个Uncaught TypeErrors

时间:2015-08-02 16:42:12

标签: javascript jquery wordpress

我已经检查了我的Wordpress网站,我认为我有一些冲突的插件或正在发生的事情阻止了某些脚本运行。以下是控制台的错误

  1. 未捕获的TypeError:jQuery(...)。superslides不是函数

  2. 未捕获TypeError:jQuery(...)。doubleTapToGo不是函数

  3. 未捕获TypeError:jQuery(...)。flexslider不是函数

  4. 以下是每个错误的单独代码。

    未捕获TypeError:jQuery(...)。superslides不是函数

    jQuery('.max-hero').superslides({
          animation: 'fade'
        });
    

    未捕获TypeError:jQuery(...)。doubleTapToGo不是函数

    jQuery(document).ready(function($){
    var deviceAgent = navigator.userAgent.toLowerCase();
    var agentID = deviceAgent.match(/(iphone|ipod|ipad)/);
    if (agentID) {
    
        var width = jQuery(window).width();
    if (width > 768) {
        if(jQuery( '#nav li:has(ul)' ).length)
        {
            jQuery( '#nav li:has(ul)' ).doubleTapToGo();
        }
    }
    
    }
    else {
    jQuery( '#nav li:has(ul)' ).doubleTapToGo();
    }
    });
    

    未捕获TypeError:jQuery(...)。flexslider不是函数

    jQuery(window).load(function() {
        jQuery('.flexslider').flexslider();
      });
    

    编辑:我修复了问题,在看到页面跳转的html目标干扰了控制台中的jQuery之后,我删除了它并且所有脚本都运行良好。

0 个答案:

没有答案