webcito / bs-phone-input
description
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Language:HTML
Requires
- components/jquery: ~3.6.0
- twbs/bootstrap: ~v5.3.0
This package is auto-updated.
Last update: 2025-01-13 13:22:02 UTC
README
This plugin creates an input group preceded by a dropdown of all countries.
Installation
manual
Download and include the script at the end of the body tag.
<!--suppress HtmlUnknownTarget --> <script src="path/to/jquery.bsPhone.min.js" type="text/javascript">
composer
via command
composer require webcito/bs-phone-input:dev-main
via composer.json
{ "require": { "webcito/bs-phone-input": "dev-main" } }
Usage
All inputs with the attribute [data-bs-toggle="phone"]
are initialized automatically.
<input type="tel" value="+49123456789" data-bs-toggle="phone" id="example"> <!-- load jQuery and Bootstrap before --> <script src="dist/jquery.bsPhone.min.js" type="text/javascript"> <script> $('#example').bsPhone(); </script>
Options
Methods
Methods are called as follows
$('input').bsPhone('method', param);