12

The previous version had a 'titleShow': false, setting, however it seems to have been removed for the new version.

I know I can hide it programmatically using jquery but I'd prefer to use a built in feature to remove it??

4
  • If its the fancybox-title-over you wan't to hide you probably could add a css rule in your page, like #fancybox-title-over { display:none; } Commented Nov 24, 2011 at 14:18
  • Yeh I've had to do it that way, but it means the calculated margin at the top and bottom are different. I would have preferred it to be an option like in the previous version so margins are calculated based on showing the title or not..
    – andrewm
    Commented Nov 24, 2011 at 14:24
  • Well I'm looking at the API spec for version 1.3+ and it says that titleShow: bool still works fancybox.net/api Commented Nov 24, 2011 at 14:26
  • That's the old documentation though. The new documentation is at fancyapps.com/fancybox/#docs . It definitely doesn't work, I have two implementations running, one on each version and titleShow only works on the previous version.
    – andrewm
    Commented Nov 24, 2011 at 14:36

8 Answers 8

21

You can disable title helper -

$(".fancybox").fancybox({
    helpers: { 
        title: null
    }
});
2
  • 1
    works for me too; you could also use - "helpers: {title: false}" - Janis cannot be wrong, after all he is fancybox's creator :)
    – JFK
    Commented Nov 24, 2011 at 21:32
  • @Janis It only works if helpers is the first option of fancybox. When I have openEffect and closeEffect first it does not hide the title, but when I move it up to the top it works.
    – olofom
    Commented May 21, 2012 at 11:25
3

Top disable the title;

$(".fancybox").fancybox({ helpers: { title: false } });

2

I used this css to hide title:

#fancybox-title-float-wrap {
    display: none;
}
1
  • Thanks, but the top answer actually does work if you have a read through the comments on it. @Janis (the person who answered the question) is actually the creator of fancybox so wouldn't want to doubt him!
    – andrewm
    Commented Mar 27, 2014 at 13:20
1

In CSS file: give visibility:hidden in

fancybox-title-float-left, 
fancybox-title-float-main,
fancybox-title-float-right, 
0

If you just delete the title attribute from the the anchor tag there is not title shown. Doesn't that work for you?

1
  • I pass in the unique id of the item clicked as the title so that on the 'afterShow' event I can perform an ajax call to save an audit of the click
    – andrewm
    Commented Nov 24, 2011 at 16:24
0

I had to rip out the line of code that appends the title as I could find no way of doing it using the API..

c.appendTo("over"===b.type?a.inner:"outside"===b.type?a.wrap:a.outer)
0

in the .css file, change:

.fancybox-opened .fancybox-title {
    visibility: visible;
}

to

.fancybox-opened .fancybox-title {
    visibility: hidden;
}

Tested on 2.0.5.

-1

title: null

I have checked it and it works for me.

1
  • 1
    Perhaps you can add some more details to your answer?
    – oɔɯǝɹ
    Commented Dec 24, 2012 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.