jQuery Mask Plugin - Issue Report

You don't need to start from scratch..

by Robert Herring

HTML

<script src="http://igorescobar.github.io/jQuery-Mask-Plugin/js/jquery.mask.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap-theme.min.css">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
<div class="container">
    <h3>Problems with jQuery Mask Plugin?</h3>
    <p>Test it on Mozilla Firefox for android and type the numbers from 0 to 8 and your result will be 1234-6785, sorry for my english.</p>
    <hr />

    <form role="form">

        <div class="form-group">
            <label for="phone-field">Phone</label>
            <input type="tel" name="phone-field" class="form-control" id="phone-field">
        </div>

        <div class="form-group">
            <label for="usphone-field">US Phone</label>
            <input type="tel" name="usphone-field" class="form-control" id="usphone-field">
        </div>

        <button type="submit" class="btn btn-default">Submit</button>
    </form>
</div>

JavaScript

$('#phone-field').mask("0000-0000");
$('#usphone-field').mask("(999) 999-9999");