Fancybox 2 And Fancybox 1.3.4 In WordPress

Fancybox 2 is final now – I don’t use fancybox 1 or 2 anymore

Now FancyBox is out, to me the old 1.3.4 is working quite well, the only thing I like about this FancyBox is the full size image display with the helpers.js which is great. The buttons for gallery are very useful and jquery is the best for all users platforms. So, I still want to use FancyBox 1.3.4 with FancyBox on the same website, I had to modify the FancyBox 1.3.4.js and put no-conflict for FancyBox Now my website can use both Fancybox1.3.4 and 2.0.

To install this on WordPress, we need to add all the scripts before the </head> of the theme header.php. If we’re going to use players like Jwplayer or nonverblasters, we need to include them in this block also. As the rule of thumb, if we’re going to use many scripts, it’s good to have JQuery.noConflict defined for each script we use. For our FancyBox we use $jQ as the alias for $ sign. The scripts that will run all FancyBox classes is in the “idogfb2061.js” (this is a custom script that I created for FancyBox2.0.6.1). I like to use FancyBox because it’s supported by almost all devices out there.

<script type=”text/javascript” src=””></script>

<!– Add mousewheel plugin –>
<script type=”text/javascript” src=”/idogjs/fancybox2061/jquery.mousewheel-3.0.6.pack.js”></script>

<!– Add fancyBox –>
<script type=”text/javascript” src=”/idogjs/fancybox2061/jquery.fancybox.pack.js”></script>
<link rel=”stylesheet” type=”text/css” href=”/idogjs/fancybox2061/jquery.fancybox.css” media=”screen” />

<!– Add fancyBox – button helper –>
<link rel=”stylesheet” type=”text/css” href=”/idogjs/fancybox2061/helpers/jquery.fancybox-buttons.css” />
<script type=”text/javascript” src=”/idogjs/fancybox2061/helpers/jquery.fancybox-buttons.js”></script>

<!– Add fancyBox – thumbnail helper –>
<link rel=”stylesheet” type=”text/css” href=”/idogjs/fancybox2061/helpers/jquery.fancybox-thumbs.css” />
<script type=”text/javascript” src=”/idogjs/fancybox2061/helpers/jquery.fancybox-thumbs.js”></script>
<script type=”text/javascript” src=”/idogjs/fancybox2061/helpers/jquery.fancybox-media.js”></script>
<script type=”text/javascript” src=”/idogjs/fancybox2061/jquery.easing-1.3.pack.js”></script>
<script type=”text/javascript”>
var $jF=jQuery.noConflict();
<script type=”text/javascript” src=”/idogjs/fancybox2061/idogfb2061.js”></script>
<!-end fancybox–>

Fancybox 1.3.4


The new fancybox require more codes to display iframe

fitToView    : false,
width        : ‘90%’,
height        : ‘90%’,
autoSize    : false,
closeClick    : false,
openEffect    : ‘none’,
closeEffect    : ‘none’,
helpers    : {
title    : {
type: ‘outside’
overlay    : {
opacity : 0.8,
css : {
‘background-color’ : ‘#000’

<! class=”ib2 fancybox.iframe” a title=”HTML” href=””>HTML </a>

HTML Without fancybox.iframe

<! class=”ib2″ a title=”HTML” href=””>HTML </a>

PDF file is the same used with fancybox.iframe

<!a class=”pdfr fancybox.iframe” title=”PDF display” href=”/media/teststuff/lockcoding.pdf”>PDF file</a>

YouTube full url autoplay

Use media.js which is very easy to use, but still have to change the screen size.

maxWidth    :640,
maxHeight    : 400,
openEffect  : ‘fade’,
closeEffect : ‘elastic’,
helpers : {
media : {},
overlay    : {
opacity : 0.8,
css : {
‘background-color’ : ‘#420000’

<a! class=”mediar” title=”dognmonkey” href=”;autoplay=1″>YouTube full url autoplay</a>

YouTube playlist iframe

maxWidth :640,
maxHeight : 385,
openEffect : ‘fade’,
closeEffect : ‘elastic’,
helpers : {
overlay : {
opacity : 0.8,
css : {
‘background-color’ : ‘#000022’

<a! class=”iu2bl” title=”dognmonkey” href=””>YouTube playlist iframe</a>

Vimeo Url

<a! class=”mediab” title=”Short Love Story” href=”;fullscreen=1″>Vimeo Url </a>

Vimeo Moogaloop

<a! class=”mediar” title=”Short Love Story” href=”;fullscreen=1″ rel=”vimeo”>Vimeo Moogaloop</a>

jwplayer flv test without autostart

<a! class=”mediar” title=”Jwplayer swf red no autostart” href=”/js/fancybox/player.swf?&amp;file=/media/teststuff/a8.flv&amp;image=/media/teststuff/tn_cab04_76.JPG&amp;backcolor=000000&amp;skin=/js/fancybox/;bufferlength=8&amp;volume=50″>jwplayer flv test without autostart</a>

jwplayer mov with autostart test

<a! class=”mediabl” title=”jwplayer mov blue autoplay” href=”/js/fancybox/player.swf?&amp;file=/media/teststuff/;autostart=true”>jwplayer mov with autostart test</a>

Nonverblaster MOV with autoplay test

<a! class=”mediabl” title=”Nonverblaster MOV white autoplay” href=”/js/fancybox/NonverBlaster.swf?&amp;teaserURL=/media/teststuff/tn_cab04_75.JPG&amp;mediaURL=/media/teststuff/;autoPlay=true”>Nonverblaster MOV with autoplay test</a>

Nonverblaster flv with teaser image test

<a title=”Nonverblaster flv black with teaser image” href=”/js/fancybox/NonverBlaster.swf?&amp;teaserURL=/media/teststuff/tn_cab04_75.JPG&amp;mediaURL=/media/teststuff/a8.flv”>Nonverblaster flv with teaser image test</a>

flowplayer mov test

<a! class=”mediar” title=”flowplayer mov in white” href=”/js/fancybox/flowplayer-3.2.5.swf?&amp;config={‘clip’:’/media/teststuff/’,’autoBuffering’: ‘true’}”>flowplayer mov test</a>

sixflag marineworld

<a! class=”ir2 fancybox.iframe” href=”;source=s_q&amp;hl=en&amp;geocode=&amp;q=1001+Fairgrounds+Dr,+Vallejo,+CA&amp;sll=37.0625,-95.677068&amp;sspn=51.443116,135.263672&amp;ie=UTF8&amp;hq=&amp;hnear=1001+Fairgrounds+Dr,+Vallejo,+Solano,+California+94589&amp;ll=38.146168,-122.226076&amp;spn=0.023625,0.036478&amp;z=14&amp;iwloc=A&amp;output=embed”>sixflag marineworld</a>

9 Replies to “Fancybox 2 And Fancybox 1.3.4 In WordPress”

  1. Hello there,

    I just found your PDF example the only one which really works. Whats the magic in that? Server configuration? Pdf version/compression? .htaccess declaration?

    Neither the official example works ( ) .

    I need this magic!

    Diego Lameira

    1. this is the script for “pdfr”

Leave a Reply

Your email address will not be published. Required fields are marked *