2013-12-24 49 views
0

我在这里一定JQuery的元素已经停止运作类型错误:jQuery的(...)的插件名称是不是一个函数

最主要的是与音频播放器上我的WordPress网站的问题插件,我们使用..

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

当萤火虫在此点击谈到了:

<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  
     }); 
    }); 

我们的网页上有萤火虫错误的所有方式。在我看来像jQuery已经装入不正确,但我第一次尝试将JQuery的链接在标题中,首先在页脚,使用谷歌和JQuery托管型,甚至是最新版本:

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

任何想法?

+0

检查您是否只在页面中加载jQuery的一个版本,并在所有插件之前加载 – charlietfl

+0

如果jQuery没有加载,错误将沿'调用undefined'或'jQuery的方法未定义'。据我所知,WordPress现在带有jQuery,所以不需要插入另一个。 – Joseph

+0

你使用这个插件HTML5音频播放器WordPress插件?或任何其他音频插件? –

回答

0

执行下列操作,以正确的jQuery WordPress的加载,在你的模板的header.php头部分如果不是有

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

<?php wp_head(); ?> 

添加这个wp_head功能后添加脚本

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

对于更详细的解释检查http://digwp.com/2009/06/including-jquery-in-wordpress-the-right-way/

相关问题