jQuery colorbox plugin not working

user2734700

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!

Mohamed Khamis

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

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Regex not working in jquery validation plugin

From Dev

Jquery plugin not working with Rails 4

From Dev

jquery colorbox and custom scrollbar

From Dev

jQuery UI not working in WordPress plugin

From Dev

JQuery and Colorbox loaded but "colorbox is not a function"

From Dev

jQuery slick (carousel) plugin not working

From Dev

Chaining not working on jQuery Plugin

From Dev

CSS for Jquery plugin Chosen is not working

From Dev

jQuery slick carousel plugin not working

From Dev

Colorbox image display not working

From Dev

Google DFP is not working with jQuery colorbox

From Dev

Login with Jquery Colorbox Plugin

From Dev

jquery colorbox cboxClose is not working in ie?

From Dev

jQuery Colorbox plugin destroy the container div after first view

From Dev

jquery colorbox and custom scrollbar

From Dev

jQuery UI not working in WordPress plugin

From Dev

Colorbox Plugin is working for only first link which i am clicked first.?

From Dev

jQuery 'swiper' plugin mysteriously not working

From Dev

Jquery MultiZoom Plugin Not Working Properly

From Dev

jQuery validate plugin is working unexpectedly

From Dev

Close icon breaks in colorbox - Jquery colorbox

From Dev

jQuery plugins conflict with colorbox

From Dev

Why is jQuery not working in this wordpress plugin?

From Dev

Jquery tablesorter plugin is not working

From Dev

Colorbox with bxslider not working

From Dev

jQuery Image Resize on Colorbox

From Dev

Colorbox not working, possibly conflicting with RoyalSlider

From Dev

Simple jQuery plugin not working

From Dev

Jquery countdownTimer Plugin not working