Because fancybox v1.3.4 seems to have problems with displaying jpe images and to keep things up to date I decided to update a website of one of my clients from fancybox v1.3.4 to v2.1.5. Here is what I needed to do.
The website basically contains a gallery. If a visitor clicks a thumbnail, fancybox opens a modal window and shows the image in a bigger size. Additionally one can cycle through all the pictures using the right or left arrows in the box.
The old fancybox was integrated into my website like this:
1. Download the current version of fancybox
Download here: http://fancyapps.com/fancybox/#license
2. Create a new folder (optional)
I created a new folder
js/fancybox2 to keep things seperate. Of course you can just clear the old folder and put the files there but I like to be able to fallback to the old version if something goes wrong.
3. Copy fancybox files
From the ZIP file copy all files from the
lib directory (including the helpers folder) to the new folder.
4. Change HTML references
To use the new fancybox code change lines 10 and 11:
Those steps in my case were all I had to do. I thought it would be more work…
To see all (new) functions of fancybox visit: http://fancyapps.com/fancybox/
Was this article helpful?
Consider buying me a coffee to keep my brain fueled 🙂