【发布时间】:2010-12-16 07:49:53
【问题描述】:
我已将颜色框 jQuery 插件集成到 Wordpress 主题中。
但是在主页上它显示
$("a[rel='example1']").colorbox 不是函数
但是当我在内页上运行代码时,它工作正常。
请帮忙
下面是头文件的代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo bloginfo('title');?></title>
<link rel="shortcut icon" href="<?php echo bloginfo('template_url')?>/images/icon.jpg"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="<?php echo bloginfo('stylesheet_url')?>" type="text/css" rel="stylesheet" />
<link media="screen" rel="stylesheet" href="<?php echo bloginfo('template_url')?>/css/colorbox.css" />
<script src="<?php echo bloginfo('template_url')?>/colorbox/jquery.min.js"></script>
<script type="text/javascript" src="<?php echo bloginfo('template_url')?>/js/browcss.js"></script>
<script src="<?php echo bloginfo('template_url')?>/colorbox/jquery.colorbox.js"></script>
<script language="javascript" type="text/javascript" src="<?php echo bloginfo('template_url')?>/js/site.js"></script>
<script language="JavaScript" src="<?php echo bloginfo('template_url')?>/js/swfobject.js"></script>
<?php
wp_head();
?>
【问题讨论】:
-
你上传了 ColorBox 插件吗?你是如何链接到文件的?
-
@codemaster 是 jquery 和其他插件发生冲突吗?你能试试jquery非冲突吗
-
确切的错误是什么?
-
如果没有更多信息,这个问题几乎无法回答。我们可以生成一个合理的原因列表供您进行故障排除,但为什么不简单地展示一些代码或示例站点的链接呢?
-
问题一直出现在网站首页...