Note that there are some explanatory texts on larger screens.

plurals
  1. POTrying to use the fancybox image system
    primarykey
    data
    text
    <p>I am trying to use the fancybox system described here: <a href="http://fearlessflyer.com/2011/01/create-an-awesome-photo-gallery-with-fancybox-and-timthumb/" rel="nofollow">http://fearlessflyer.com/2011/01/create-an-awesome-photo-gallery-with-fancybox-and-timthumb/</a></p> <p>I can get the thumbnails to appear, but when I include the rel=lightbox feature and script, I do not see the fancy box system working (the thumbnails look the same). And when I click an image with rel=lightbox included in the path, I get an error saying the path was not found on this server. </p> <p>I am using the latest versions of jquery (jquery-1.7.1.min.js) and fancy box (v 1.3.4).</p> <p>Here is the code:</p> <pre><code>&lt;?php $path = 'http://' . $_SERVER['SERVER_NAME'] . '/WhereTheImagesAre/'; $files = scandir('WhereTheImagesAre/'); ?&gt; &lt;!DOCTYPE html&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://ogp.me/ns/fb#"&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;link rel="shortcut icon" href="/favicon.ico?"&gt; &lt;title&gt;Title&lt;/title&gt; &lt;link type="text/css" href="/CSS/style.css" rel="stylesheet" media="screen" /&gt; &lt;script type="text/javascript" src="Scripts/jquery-1.7.1.min.js"&gt;&lt;/script&gt; &lt;script type="text/javascript" src="Scripts/jquery.fancybox-1.3.4.js"&gt;&lt;/script&gt; &lt;link rel="stylesheet" type="text/css" href="Scripts/fancybox/jquery.fancybox-1.3.4.css" /&gt; &lt;script&gt; $(document).ready(function(){ $("a[rel=lightbox]").fancybox({ 'transitionIn' : 'elastic', 'transitionOut' : 'elastic' }); }); &lt;/script&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="logo"&gt;&lt;img src="/images/Logo.png"/&gt;&lt;/div&gt; &lt;div class="wrap"&gt; &lt;div class="content_wrap"&gt; &lt;div class="content"&gt; &lt;ul&gt; &lt;?php foreach ($files as $file){ if ($file == '.' || $file == '..'){ echo ''; } else { ?&gt; &lt;li &gt;&lt;a href="&lt;?php echo $path . $file; ?&gt; rel=”lightbox” "&gt;&lt;img src="Scripts/timthumb.php?src=&lt;?php echo $path . $file; ?&gt;&amp;h=194&amp;w=224&amp;zc=1&amp;q=100" /&gt;&lt;/a&gt;&lt;/li&gt; &lt;?php } }?&gt; &lt;/ul&gt; &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>If you can help me determine what is going wrong, I would greatly appreciate it. Thank you.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload