user2734700 user2734700 - 1 year ago 65
jQuery Question

jQuery colorbox plugin not working

I am making a kind of gallery using the colorbox plugin (, 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>



<link rel="stylesheet" href="colorbox.css" />

<script src="jquery.js"></script>

<script src="jquery.colorbox.min.js"></script>



<a class='gallery' href='image.jpg'>Photo_1</a>


alert('colorbox is about to open')





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!

Answer Source

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: >=

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download