🔔 Alert..!! Get 2 Month Free Cloud Hosting With $200 Bonus From Digital Ocean ACTIVATE DEAL

Prefix Input is an ultra lightweight jQuery plugin which automatically adds a predefined prefix as your user types something into a input field.

input prefix

Documentation

jQuery-Prefix-Input

jquery plugins to provide the input prefix


Example:

Install: Selector by class name in all the input

Member Name <input type="text" class="demo" data-prefix="JKT48_" /> Website <input type="text" class="demo" data-prefix="http://" /> Phone <input type="text" class="demo" data-prefix="+62" />

jQuery:

<!-- Include jQuery --> <script src="//code.jquery.com/jquery-2.1.1.min.js"></script> 

<!-- Include prefix-input.js --> <script src="js/jquery.prefix-input.js"></script> <script>
$(function() { $(".demo").prefix(); }); </script>


You May Also Like