Jeff
Jeff

Reputation: 72

Fancybox works in dreamweaver but not in browser?

I have been having problems with this thing for awhile now! I have finally got it set up and working right in dreamweaver.. I have no experience in javascript/jquery and VERY little experience in HTML and CSS, actually this site is for my final which is due tomorrow at 5pm.. I have asked this already but since then i have fixed that issue and came upon this one.. what do i do? I will include photos of everything. I have made a "test" page to try and see the least amount of code possible thinking i was getting something wrong and not noticing it because of everything else on the screen, and that was actually true for the 1st problem i had, once i made this page i noticed what was wrong and corrected it. Since i can't post photos yet here is the code that i have been having problems with

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
<link rel="stylesheet" href="/fancybox/source/jquery.fancybox.css?v=2.1.5" type="text/css" media="screen" />
<script type="text/javascript" src="/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>

<tr>
<td><a class="fancybox" data-fancybox-group="gallery1" href="assets/PetesTatts/1383211_606271702752068_1200146930_n.jpg"><img src="assets/PetesTatts/1383211_606271702752068_1200146930_n.jpg" width="175" height="177" alt=""/></a></td>
<td><a class="fancybox" data-fancybox-group="gallery1"href="assets/PetesTatts/1385264_612275125485059_2140615835_n.jpg"><img src="assets/PetesTatts/1385264_612275125485059_2140615835_n.jpg" width="175" height="177" alt=""/></a></td>
<td><a class="fancybox" data-fancybox-group="gallery1" href="assets/PetesTatts/1395198_615888051790433_921813584_n.jpg"><img src="assets/PetesTatts/1395198_615888051790433_921813584_n.jpg" width="175" height="177" alt=""/></a></td>
<td><a class="fancybox" data-fancybox-group="gallery1" href="assets/PetesTatts/1395204_606590826053489_121841936_n.jpg"><img src="assets/PetesTatts/1395204_606590826053489_121841936_n.jpg" width="175" height="177" alt=""/></a></td>
<td><a class="fancybox" data-fancybox-group="gallery1" href="assets/PetesTatts/1395216_601485709897334_965449977_n.jpg"><img src="assets/PetesTatts/1395216_601485709897334_965449977_n.jpg" width="175" height="177" alt=""/></a></td>
</tr>


<script type="text/javascript">
$(document).ready(function() {
$(".fancybox").fancybox({
    openEffect  : 'none',
    closeEffect : 'none'
});
});
</script>

Upvotes: 0

Views: 158

Answers (1)

Andre de Almeida
Andre de Almeida

Reputation: 40

In the link and script tag remove the "/" before fancybox and it should load correctly.

It should look like this:

<link rel="stylesheet" href="fancybox/source/jquery.fancybox.css?v=2.1.5" type="text/css" media="screen" />

<script type="text/javascript" src="fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>

Upvotes: 1

Related Questions