How to create BBC style tooltip popup (facebox?)

I have tried to parse the code but cannot reproduce it.

On the BBC weather homepage http://news.bbc.co.uk/weather/ you will see a small quetionmark in the circle in the upper right corner or from boxes. When you click on it, a popup window appears with helpful hints that looks a bit like a facebox.

The main thing I love about this question is the little arrow pointing to the help button to the right of the container. Facebox is just a standard square.

If anyone knows how to replicate it, some help would be greatly appreciated.

Regards, Ian

+2


a source to share


2 answers


The effect is known as a modal window and was popularized primarily by the Lightbox javascript library . There are many libraries currently available to create this effect, but the most popular use the jQuery JavaScript framework .



My personal favorite is the jQuery ColorBox implementation (lightweight, customizable lightbox plugin for jQuery 1.3 and 1.4). Take a look at the Other Content Types section on your demo page for examples of something similar to what is seen on the BBC.

+1


a source


I did something similar to this using a hidden DIV on the page. Then I attached a javascript event to an icon (?) To toggle the visibility of the DIV. For the "popup" form, it seems to me that it could only be background graphics.



I have an example of that at www.sitemills.com/prices.php if you're interested. Sure enough the javascript is inline, so you should be able to view the source.

0


a source







All Articles