简体   繁体   English

TypeError:jQuery(…).plugin-name不是一个函数

[英]TypeError: jQuery(…).plugin-name is not a function

I'm having an issue on my Wordpress site where certain JQuery elements have ceased to function 我的Wordpress网站上出现问题,某些JQuery元素已停止运行

The main one is relating to an audio player plugin which we use.. 主要与我们使用的音频播放器插件有关。

TypeError: jQuery(...).audio1_html5 is not a function
isProgressInitialized:false

When clicking on this in Firebug it comes up with: 在Firebug中单击时,它带有:

<script>
    jQuery(function() {
        jQuery("#lbg_audio1_html5_25").audio1_html5({
            skin:"whiteControllers",
            initialVolume:1,
            autoPlay:false,
            loop:false,
            playerPadding:5,
            playerBg:"#000000",
            bufferEmptyColor:"#929292",
            bufferFullColor:"#454545",
            seekbarColor:"#FFFFFF",
            volumeOffColor:"#454545",
            volumeOnColor:"#FFFFFF",
            timerColor:"#FFFFFF",
            songAuthorTitleColor:"#FFFFFF",
            showRewindBut:true,
            showPlayBut:true,
            showPreviousBut:true,
            showNextBut:true,
            showPlaylistBut:true,
            showVolumeBut:true,             
            showVolumeSliderBut:true,
            showTimer:true,
            showSeekBar:true,
            showAuthor:true,
            showTitle:true,
            showPlaylist:true,              
            showPlaylistOnInit:true,                
            playlistTopPos:2,               
            playlistBgColor:"#000000",
            playlistRecordBgOffColor:"#000000",
            playlistRecordBgOnColor:"#333333",
            playlistRecordBottomBorderOffColor:"#333333",
            playlistRecordBottomBorderOnColor:"#FFFFFF",
            playlistRecordTextOffColor:"#777777",
            playlistRecordTextOnColor:"#FFFFFF",
            numberOfThumbsPerScreen:5,
            playlistPadding:4,
            showPlaylistNumber:true,
            isSliderInitialized:false,
            isProgressInitialized:false     
        });
    });

On our homepage there is all manner of errors in Firebug. 在我们的主页上,Firebug中存在各种错误。 It looks to me like JQuery has not loaded correctly, however I've tried placing JQuery links first in the header, first in the footer, using both Google and JQuery hosted, and even the latest version: 在我看来,JQuery尚未正确加载,但是我尝试使用托管的Google和JQuery甚至最新版本,将JQuery链接放在页眉中,放在页脚中。

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>

Any ideas? 有任何想法吗?

Do the following to load jquery properly for wordpress, in your template header.php add this in head section if not there 执行以下操作以正确加载wordpress的jquery,在模板header.php中将其添加到head部分(如果不存在)

<?php wp_enqueue_script("jquery"); ?>

<?php wp_head(); ?>

After the wp_head function add your script 在wp_head函数之后,添加您的脚本

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>

For more detailed explanation check http://digwp.com/2009/06/including-jquery-in-wordpress-the-right-way/ 有关更多详细说明,请访问http://digwp.com/2009/06/ includes-jquery-in-wordpress-the-right-way /

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Gulp`TypeError:“插件名称”不是函数` - Gulp `TypeError: “plugin-name” is not a function` Jquery 验证插件 - TypeError: $(...).validate 不是函数 - Jquery validation plugin - TypeError: $(…).validate is not a function jQuery插件-调用函数返回Uncaught TypeError - jQuery Plugin - Calling a function return Uncaught TypeError 我的jquery插件中的“ TypeError:$(…).characterCounter不是函数” - 'TypeError: $(…).characterCounter is not a function' in my jquery plugin Uncaught TypeError:未定义不是自定义jQuery插件的函数 - Uncaught TypeError: undefined is not a function with custom jQuery Plugin jquery插件Uncaught TypeError:object不是函数 - jquery plugin Uncaught TypeError: object is not a function jquery webcam plugin TypeError:webcam.capture不是偶尔抛出的函数 - jquery webcam plugin TypeError: webcam.capture is not a function thrown occasionally jQuery treeTable插件抛出错误“ TypeError:$(…).treetable不是函数” - jQuery treeTable Plugin throwing error “TypeError: $(…).treetable is not a function” 未捕获的TypeError:在Magento中使用jQuery插件时,undefined不是一个函数 - Uncaught TypeError: undefined is not a function when using a jQuery plugin in Magento TypeError Jquery(…).function不是函数 - TypeError Jquery(…).function is not a function
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM