FancyBox doesn't load

FancyBox won’t load here. Checked the paths all looks good, click the Cafe Icon.

It appears you have the main Fancybox .js file linked to from the <head> of your page, but I don’t see the following in the <head> anywhere (though I might have missed it):

$(document).ready(function() {

	/* This is basic - uses default settings */
	
	$("a#single_image").fancybox();
	
	/* Using custom settings */
	
	$("a#inline").fancybox({
		'hideOnContentClick': true
	});

	/* Apply fancybox to multiple items */
	
	$("a.group").fancybox({
		'transitionIn'	:	'elastic',
		'transitionOut'	:	'elastic',
		'speedIn'		:	600,
		'speedOut'		:	200,
		'overlayShow'	:	false
	});
	
});

Then on a linked image (if it’s just a single image that’s not part of a group) than it needs an ID (you can only declare an ID once per page) of single_image:

<a id="single_image" title="" href=""><img src="" alt="" /></a>

If you have a group of images (as it appears you do on that page) you can assign a class (can have as many of the same class as you want per page) of grouped_elements with a matching rel=“” attribute.

<ul>
<li><a class="grouped_elements" rel="group1" href="#" title="#"><img src="image1.jpg" alt="" /></a></li>
<li><a class="grouped_elements" rel="group1" href="#" title="#"><img src="image2.jpg" alt="" /></a></li>
</ul>

Also you appear to be using an older version of Fancybox. Not sure if upgrading to the latest will solve the issues you’re having, but it’s probably a good idea to do, nonetheless. :slight_smile:

More info!

Hope it helps. :slight_smile:

Using flow player, sorry.

LOLzilla :shifty:

I found this, it seems pretty easy to set up: http://flowplayer.org/demos/installation/multiple-players.html

It was working. Now it’s not, I guess it breaks on it’s own. (This)

This is so odd. Any ideas ? My Paths are good.

Unless I’m doing something stupid again.

Try comparing your current page to the version that was working a few weeks ago. If you don’t have a copy, Google has it cached.

I can’t pin point the problem. I’m scanning everything using FireBug and HTTP request, comparing the paths etc. I can’t find it.

If you study the current HTML with Firebug you’ll see that, when the current page loads, the Fancybox code is correctly generated at the bottom of the body.

Here’s what happens in the older, working version of the page: when the video link is clicked, #fancy_outer is given some inline styles including display:block;. When the video ends or the background is clicked, the display value changes to none.

When the video link is clicked in the current page, display:block; is not applied to #fancy_outer. If you highlight #fancy_outer in Firebug and add display:block in the Style panel, the video will appear and play.

Find what’s preventing display:block from being applied - to show the element - and you’ll fix it.

The old version of the page uses a different version of jQuery: 1.4.2 rather than 1.6.4. Maybe that has something to do with it.

The little stuff always gets me. It frustrates me. I think I changed the style and didn’t change it back. Thank you.

If you study the current HTML with Firebug you’ll see that, when the current page loads, the Fancybox code is correctly generated at the bottom of the body.

How did you find this out ?

The generated code is shown in Firebug’s HTML pane. Hidden elements are greyed out. #fancy_outer is in #fancy_wrap.

Your linked page isn’t working yet. Did you try the older jQuery?

Problem was jQuery. Victor do you remember the issue I was having with IE and the contact page, I know this is not related to JS but if you could test ? I had someone test a little while ago they didn’t experience any issues, so I’m a little bewildered.

The Contact form validation still has the same bug.

Odd. Can you personally recall if it was there before the downgrade of jquery ? I need to nail this bug.

No, I didn’t test your form with the later version of jQuery.

This bug seems to be hard to explain, do you have any suggestions on explaining ? Mentioning there is flickering between two fields appears vague.

I described the bug and the process of activating it on your previous thread. As I [URL=“http://www.sitepoint.com/forums/showthread.php?790458-Form-Script-flawed-in-IE-7-8-9&p=4976416&viewfull=1#post4976416”]said before, the script seems to have been buggy from the outset, so your best bet is to either contact the person who [URL=“http://www.sitepoint.com/forums/showthread.php?756503-Hash-Change-on-Forum&p=4885706&viewfull=1#post4885706”]supplied it or look for an alternative.

Thanx. I’m going to hopefully find a solution.