I can’t get any JQuery code to work on my website, in particular, slidebox. By the JQuery is not working, I mean, in this case, that when I click on a link, a tag, nothing happens, when really a lightbox should be appearing.
Please can you tell me where I am going wrong?
<head>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4 /jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="shadowbox.css">
<script type="text/javascript" src="shadowbox.js"></script>
<script type="text/javascript">
Shadowbox.init();
</script>
</head>
<body>
<div class="wrapper">
<header>
<a class="logo" href="..."></a>
<h1><strong>...</strong>iOS Developer</h1>
</header>
<section class="portfolio">
<a href="img/image.png" rel="shadowbox" title="SocialPic - Coming fall 2011"><img src="img/image2.png" /></a>
<a title="SocialPic - Coming fall 2011" href="img/SocialPic-iPhone.png"><img src="img/image2.png" /></a>
<a title="SocialPic - Coming fall 2011" href="img/SocialPic-iPhone.png"><img src="img/image2.png" /></a>
<a title="SocialPic - Coming fall 2011" href="img/SocialPic-iPhone.png"><img src="img/image2.png" /></a>
</section>
I suspect it isn’t working because there is a space in the path to jQuery. Remove the space and try again. 🙂
http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js