HideonTitleClick : close fancybox with a click on your title

57 views
Skip to first unread message

lilibird

unread,
May 8, 2012, 7:01:31 AM5/8/12
to fancybox
Hello,

for those who you use HideonContentClick : true to close the fancybox
window with out a close button, and who have some long description
insteed of title, you will notice that when you click on the title you
can't close the fancybox. Mainly when your description is on left or
right and take 500 pixels height. It's take all the area width and
make quite impossible to close with HideonContentClick. To easily make
clickable your text area this is a solution. Of course some others
solutions might be efficient to, but this one works for me and was
easy to do. Sorry for my poor english, hope you can read me...



This is a solution to do it :

in jquery.fancybox-1.3;4.js

after the line 152 put the code :
selectedOpts.hideOnTitleClick = false;

after the line 603 put the code :
if (currentOpts.hideOnTitleClick) {
title.bind('click', $.fancybox.close);
}

and then at the end after :

hideOnContentClick : true,
put the code :
hideOnTitleClick:true,

hope it will help !

Laidir

unread,
May 14, 2012, 6:58:00 PM5/14/12
to fanc...@googlegroups.com
This is somewhere similar to where I want to go. My fancybox has no text though or title when the fancybox opens? Has only images, and when you click on the images, it goes to the next image and loops to the first image when it gets to the last. On clicking the background (transparent layer) it closes fancybox and takes you to the thumbnail page for that gallery, whereas I would like to be taken back to my portfolio page on clicking of the background OR to have some type of written link inside fancybox simply saying "Return to Menu" and when that is clicked, the whole browser tab shuts down and they are just left where they started at the portfolio page where they clicked the link to open fancybox? I have coded all links on my portfolio to open in a different tab, so when the user clicks the "Return to Menu" link after reviewing through images in fancy box the browser tab will close, but they are still on my website.

If anyone could help with how to place a written link in fancy box that when clicked achieves closing of a browser tab I'd be grateful. I am still stuck on this issue and posted about 2-3 days ago, and  can't get any further with my web site until thats resolved. I really like the look and feel of fancybox without any buttons in there at the moment. It would also be handy to be able to click left of a picture to go to prev as well as being able to click on the right to go next where my set up is concerned for good navigation. My images will be large and I have seen this done elsewhere, but not sure how they achieved it as their css coding is a complete mess when I check it and is so condensed, I would not even know where to start. 
Reply all
Reply to author
Forward
0 new messages