Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do you know any opensource JQuery dropdown menu for telephone prefix?

I need to do a dropdown menu for entering telephone numbers. I want to do something similar as google does in his registration form. Something like this:

enter image description here

Do you know any opensource dropdown menu for telephone prefix?

I have looking in google and the most similar thing I have found is this menu. I can modify it to do what I want but it will take time and I think maybe someone has already did something similar.

NOTE: The link I am sharing contains only countries and flags. I am looking for a full dropdown containing flags, country names, country names in original language, ability to add a country first ignoring alphabetical order and international phone prefixes.

like image 953
Oscar Foley Avatar asked Jun 26 '12 09:06

Oscar Foley


People also ask

How do I create a drop down menu with CSS and jquery?

Example Explained Use any element to open the dropdown menu, e.g. a <button>, <a> or <p> element. Use a container element (like <div>) to create the dropdown menu and add the dropdown links inside it. Wrap a <div> element around the button and the <div> to position the dropdown menu correctly with CSS.

What is dropdown menu in Javascript?

A dropdown list is a toggleable menu that allows the user to choose one option from multiple ones. The options in this list are defined in coding, which is associated with a function. When you click or choose this option, that function triggers and starts performing.

Which tags a menu item in a pull down or drop down?

You use the HTML select tag to create drop-down menus so that users can select the value they want. It is an instrumental feature in collecting data to be sent to a server. The select tag normally goes within a form element, with the items to choose from coded within another tag, <option> .


1 Answers

I also needed this, so I built it.

Here is a live demo.

It currently has the following features:

  • In the country dropdown you can navigate by typing, or using the up/down keys
  • Selecting a country updates the dial code of the entered number
  • Typing a different dial code automatically updates the displayed flag
  • Option to specify "preferred countries" (which appear at the top of the list)

I built it out of the following open source projects:

  • Flag images and CSS from https://github.com/lafeber/world-flags-sprite
  • Country data from https://github.com/mledoze/countries
  • Formatting and validation from the wonderful libphonenumber
like image 114
jackocnr Avatar answered Oct 05 '22 08:10

jackocnr