Alex Poole

Pragmatic PHP, MySQL, Marketing & Technology

Alex Poole header image 2

Add a Close button to a Fancybox window

January 20th, 2011 by alex

I spent ages digging around for this, and it should be simple!

Actually, it is simple. But only when you know how. This is how you add a close button to the contents of a Fancybox window (ie, the contents inside the iFrame) :

<a  href=”#” onClick=”parent.jQuery.fancybox.close();”>Close This Window</a>

So there you go.

Tags: 18 Comments

Leave a Comment

18 responses so far ↓