Fancybox with fancy title but without tooltip

Yes: it’s possible to have a fancybox with a fancy title but without the tooltip. You can even style the title, that will be shown in the modal window / popup layer without making the roll-over tool tip look wired. How? Here is how:

Usually you would put the “image caption” (or the actual image title) in the title tag. the problem might be, that the title tag is shown on rollover – and if you would like to style your image caption, then things can look funny. In the following example the “made in 2008” is supposed to be displayed in italic – but the tooltip would reveal the html tags:

“The Title of the Image <i>made in 2008</i>”

Now instead of placing the image caption inside the title tag, you can actually use the alt tag, remove the title tag and give your fancybox code the following little detail:

‘titleFromAlt’    : true

Then the alt tag of the image will be used for generating the title inside the modal window. That’s all..

This is basically just another “note to self” — but I hope you find the information useful anyways. If you’d like to have a more detailed description on how to use fancybox titles without the tooltip, then just drop me a line in the comments…

best, +…

Leave a Reply

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