Why won't the mask load a second time?

  • 0
    Why isn't the jquery.maskedinput mask loaded a second time?

    My code:

    Loading the form
    $(document).ready(function() {
            $('#fform').submit(submitCaptcha, messageSent);
            $('#id_phone').mask('+7 (999) 999-99-99');
        })


    Form close event
    function closeForm()
        {
          $('.form-order').hide();
        }


    When you first open the form, everything is fine, the mask is there. The form is closed, you open it a second time - error TypeError: $ (...). Mask is not a function.
    Plugin versions used:

    <script src="https://snipp.ru/cdn/maskedinput/jquery.maskedinput.min.js"></script>
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    JavaScript Anonymous, Mar 10, 2019

  • 0 Answers
Your Answer
To place the code, please use CodePen or similar tool. Thanks you!