How many times you had to choose your country in a form, with a old, simple popup?
I am showing the example in a iframe not to mess with WordPress styles.
As you can see, when you move the mouse over the text input, a list with (almost) every world country and flag appears, and when you click on a country, its ISO code is displayed into the text input.
When you move the mouse out of the country list, it closes.
How can it be made?
Let’ see the content of the main page
other content here other content here other content here
The trick is in the <a> and <span> css use, with a display attribute changing on hover status.
It’s easiest to see than to explain.
- åland islands
Look how I set the menu starting with an unordered list with Css (lines 5-10) and how I pass ISO values to the parent page (line 15 for example).
You can download the whole work here, check 2 html files and give me feedback or suggestion about the use of this feature.