combine images and videos on one group

634 views
Skip to first unread message

andy moon

unread,
Apr 21, 2010, 4:50:28 AM4/21/10
to fancybox
Hi,
is it possible to have one group (rel="example_group") and some files
are images and some are youtube video.
How should I write inicialised script for fancybox?

Thanks

--
You received this message because you are subscribed to the Google Groups "fancybox" group.
To post to this group, send email to fanc...@googlegroups.com.
To unsubscribe from this group, send email to fancybox+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/fancybox?hl=en.

JFK

unread,
Apr 21, 2010, 5:53:55 AM4/21/10
to fancybox
you may create different scripts for different types of content
some may be iframes, some images and some flash content (including
youtube video) and of course each of them needs different scripts with
different options, however they can be in the same gallery as long as
they share the same rel attribute value

PLEASE NOTICE that you cannot mix manual calls in this type of mixed
gallery

The youtube js example in fancybox.net is a manual call ... your would
need to convert it to a direct link call so
from this
$("#tip4").click(function() {
$.fancybox({
'padding' : 0,
'autoScale' : false,
'transitionIn' : 'none',
'transitionOut' : 'none',
'title' : this.title,
'width' : 680,
'height' : 495,
'href' : this.href.replace(new RegExp("watch\\?v=", "i"), 'v/'),
'type' : 'swf',
'swf' : {
'wmode' : 'transparent',
'allowfullscreen' : 'true'
}
});
return false;
});

to this:
$("#tip4").fancybox({
'padding' : 0,
'autoScale' : false,
'transitionIn': 'none',
'transitionOut': 'none',
'title': this.title,
'width': 680,
'height': 495,
'href': this.href,
'type': 'swf',
'swf': {
'wmode': 'transparent',
'allowfullscreen' : 'true'
}
});

and the call
from this
<a id="tip4" title="'Zombieland' Trailer" href="http://www.youtube.com/
watch?v=M-cIjPOJdFM&fs=1">Try now</a>

to this
<a id="tip4" title="'Zombieland' Trailer" href="http://www.youtube.com/
v/M-cIjPOJdFM&fs=1">Try now</a>
Reply all
Reply to author
Forward
0 new messages