Reputation: 19
I am making a kind of gallery using the colorbox plugin (http://www.jacklmoore.com/colorbox/), and I somehow cannot get it to work.
I copied the demo code right off the webpage (I modified it to fit my links)
<!doctype html>
<html>
<head>
<link rel="stylesheet" href="colorbox.css" />
<script src="jquery.js"></script>
<script src="jquery.colorbox.min.js"></script>
</head>
<body>
<a class='gallery' href='image.jpg'>Photo_1</a>
<script>
alert('colorbox is about to open')
$("a.gallery").colorbox();
</script>
</body>
</html>
So, clearly i am doing something wrong, I just cannot figure out what. I included the jquery, colorbox and colorbox.css files in my directory with the html. If you can help me, thanks in advance!
Upvotes: 0
Views: 5028
Reputation: 5
"<script src='$CFG->wwwroot/includes/js/custom.js' type='text/javascript'></script>";
"<meta http-equiv='Content-Type' content='text/html; charset=UTF-8'>";
require_once ($CFG->dirroot."/date/gcal_support.php");
($CFG->dirroot."/includes/js/jquery.validationEngine-en.php");
echo "<script src='$CFG->wwwroot/includes/js/jquery.validationEngine.js' type='text/javascript' ='utf-8'></script>";
echo "<link rel='stylesheet' href='$CFG->wwwroot/includes/css/validationEngine.jquery.css' ='text/css'/>";
echo "<link rel='stylesheet' href='$CFG->wwwroot/my/css/template.css' type='text/css'/>";
echo "<link rel='stylesheet' href='$CFG->wwwroot/users/css/style.css' type='text/css'/>";
echo "<script src='js/jquery.validate.js' type='text/javascript' charset='utf-8'></script>";
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script language="JavaScript" src="<?php $CFG->wwwroot?>/js/jquery.colorbox.js"></script>
Upvotes: -1
Reputation: 8029
You should get used to using either Firebug (a plugin for Firefox) and/or Google Chrome's inspector (which is there by default on Chrome). If you're using any of those, you can right click->inspect element, and then hit the 'Network' tab.
Refresh your page while you're in the Network tab, you'll see the HTTP requests. This will help you figure out if there is a mistyped path, or any unreachable files. Additionally, you will be able to see any javascript errors when you click the 'console' button. The console button is at the bottom left, it looks a bit like this: >=
Upvotes: 2