RobinHerbots / Inputmask

Input Mask plugin
https://robinherbots.github.io/Inputmask/
MIT License
6.4k stars 2.17k forks source link

MVC Razor with Inputmask: is not a function #1657

Open kalwe opened 7 years ago

kalwe commented 7 years ago

i install from nuget and follow instructions from readme file, but receive error in console log "is not a function"

BundleConfig.cs bundles.Add(new ScriptBundle("~/bundles/inputmask").Include( //~/Scripts/Inputmask/dependencyLibs/inputmask.dependencyLib.js", //if not using jquery "~/Scripts/jquery.inputmask.bundle.js", "~/Scripts/Inputmask/inputmask.js", "~/Scripts/Inputmask/jquery.inputmask.js", "~/Scripts/Inputmask/inputmask.extensions.js", "~/Scripts/Inputmask/inputmask.date.extensions.js", //and other extensions you want to include "~/Scripts/Inputmask/inputmask.numeric.extensions.js"));

in _Layout.cshtml add `@section Scripts {

@Scripts.Render("~/bundles/jqueryval")
@Scripts.Render("~/bundles/inputmask")

<script type="text/javascript">
    $(document).ready(function () {
        $("#Cpf").inputmask("999.999.999-99");
    });
</script>

} also using jqueryui with @Styles.Render("~/Content/themes/base/css")

@Scripts.Render("~/bundles/jqueryui")`

end bundle `bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include( "~/Scripts/jquery-ui-{version}.js"));

bundles.Add(new StyleBundle("~/Content/themes/base/css").Include( "~/Content/themes/base/core.css", "~/Content/themes/base/all.css"));`

some one can tell me whats happen pls, i would be very grateful

RobinHerbots commented 7 years ago

Currently on holiday. Will respond later.