你知道任何开源的JQuery电话前缀下拉菜单吗? [英] Do you know any opensource JQuery dropdown menu for telephone prefix?
问题描述
我需要下拉菜单输入电话号码。我想在Google 。 / p>
以下是现场演示。
它目前具有以下功能:
- 在国家/地区的下拉菜单中,您可以通过键入,或使用向上/向下键
- 选择国家/地区更新输入号码的拨号代码
- 键入不同的拨号代码会自动更新显示的标志
- 指定首选国家(出现在列表顶部)的选项
我从以下开源项目中构建了它:
- 标记图像和来自 https://github.com/lafeber/world-flags-sprite 的CSS
- https://github.com/mledoze/countries 的国家/地区数据
- 精彩的 libphonenumber 格式化和验证
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:
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.
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
这篇关于你知道任何开源的JQuery电话前缀下拉菜单吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!