【发布时间】:2013-04-03 18:02:23
【问题描述】:
我正在尝试使用以下代码将 jquery 颜色框添加到我的网页:
<!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>
<link rel="stylesheet" href="colorbox.css" />
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="jquery.colorbox-min.js"></script>
</head>
<body>
<script type="text/javascript">
$(function ()
{
$(".popup")
.colorbox({iframe:true, innerWidth:695, innerHeight:340, overlayClose:false });
})
</script>
<a class='popup' href='http://www.bbc.co.uk'>bbc.co.uk</a>
</body>
它适用于 firefox 和 chrome。但是当我在 IE7 中运行它时,出现以下错误:
对象不支持该属性或方法
任何帮助都会很棒。
【问题讨论】:
-
JavaScript 文件是否加载正确?
-
是的,所有 javascript 文件都已正确加载
-
你加载的是什么版本的jquery?
标签: javascript jquery internet-explorer colorbox