How can i create MaskedInput & Validation for Phonenumber

i try to Mask like 999-999-9999 for my phonenumber field
i found on google about jQuery maksedinput Edit fiddle - JSFiddle - Code Playground
but i cant find the way to insert in to custom code properly to make it works T.T

Anyone have some suggestion
Many thanks

Now i did this but it doesnt work

Header Code

<script src="https://code.jquery.com/jquery-3.2.1.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.mask/1.14.11/jquery.mask.js" type="text/javascript"></script>

Footer code

  $(document).ready(function(){
 	$("#TelTest").mask("999-999-9999", {placeholder: "XXX-XXX-XXXX"});
	});

Remove first line (jquery).

Move all code to footer code.

it’s work !! Many thanks