Skip to content

Instantly share code, notes, and snippets.

@flumono
Last active September 17, 2017 00:25
Show Gist options
  • Save flumono/bd886a61e734a26f1f162175db13e450 to your computer and use it in GitHub Desktop.
Save flumono/bd886a61e734a26f1f162175db13e450 to your computer and use it in GitHub Desktop.
telephone mask (маска ввода номера)
jQuery(function($){
$(".maskphone input:eq(3)").mask("+38 (999) 999-99-99",{
onBeforeMask:function(t,e){return t.replace(/^38/g,"")},
onBeforePaste:function(t,e){return t.replace(/^38/g,"")}});
}
);
///.maskphone input:eq(3) - подставить свой класс или идентификатор.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment