I’m sure this is very simple. I have gotten colorbox to work before, but when I started trying it on a new site, it just won’t load!
I have the jquery and colorbox files in the same directory as this html file along with the colorbox.css and images in the images folder from example 2. And I mean, it’s just supposed to load the colorbox when the document is ready, but it isn’t. I must be missing something very dumb, please tell me if you see anything. Thanks!
PS. I do have internet connection to get the library from the site, and I’ve tried it just linking to the file in the directory to no avail.
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<link rel="stylesheet" href="colorbox.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script>
<script src="jquery.colorbox-min.js" type="text/javascript"></script>
</head>
<body>
MAITRE U
<script>
$(document).ready(function(){
$.colorbox({html:'<p>TEST TEST</p>'});
});
</script>
</body>
</html>
Works fine here. Use view page source on your html page and make sure that the colorbox css and js files are loaded properly. Finally try with the js file from the colorbox site itself