MVC5 Classic
wijinputmask Step 2 of 3: Initializing the Widget

In the previous step, you added markup to create the input textbox and an initial numeric value. Now you can add the jQuery script to use the widget to automatically format any numbers entered to look like a phone number.

After the closing </div>  tags for the input textbox, enter the following jQuery script to initialize the wijinputmask widget and set the mask:

<script id="scriptInit" type="text/javascript">
        $(document).ready(function () {
            $("#textbox1").wijinputmask(
                  {
                      mask: '(999) 000-0000',
                      hidePromptOnLeave: true
                  });
        });
      </script>

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum |  Documentation Feedback