I am trying to add a jquery colorbox to my webpage using the code below:
<!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>
It works for both firefox and chrome. But when I run it in IE7 I get the following error:
Object doesn’t support this property or method
Any help would be amazing.
More than likely you have a
<script>tag that is invalid or that contains a type attribute set to something other thantext/javascript.Without seeing that part of the code, we can’t figure out exactly what is wrong.
More information
Script tags must have a closing
</script>.<script />will not work in all browsers.Additionally, the
typeattribute must either betext/javascriptor not present. If it isapplication/javascriptsome versions of IE will not execute it.