Skip to main content
adicionou 673 caracteres ao conteúdo
Fonte Link
pnet
  • 14,9mil
  • 34
  • 113
  • 249

Seguindo a sugestão do Filipe e GuilehermeBernal, ficou assim meu cshtml:

<script src="@Url.Content("~/Scripts/jquery-ui.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery.maskedinput.min.js")"></script>
    <script src="@Url.Content("~/Scripts/Menu.js")"></script>

    <script src="@Url.Content("~/Scripts/main.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-color.js")"></script>

    <script src="@Url.Content("~/Scripts/Util.js")"></script>
    <script src="@Url.Content("~/Scripts/Pesquisa/Pesquisa.js")"></script>

Seguindo a sugestão do Filipe e GuilehermeBernal, ficou assim meu cshtml:

<script src="@Url.Content("~/Scripts/jquery-ui.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery.maskedinput.min.js")"></script>
    <script src="@Url.Content("~/Scripts/Menu.js")"></script>

    <script src="@Url.Content("~/Scripts/main.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-color.js")"></script>

    <script src="@Url.Content("~/Scripts/Util.js")"></script>
    <script src="@Url.Content("~/Scripts/Pesquisa/Pesquisa.js")"></script>
adicionou 264 caracteres ao conteúdo
Fonte Link
pnet
  • 14,9mil
  • 34
  • 113
  • 249
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
    <script src="//code.jquery.com/jquery-1.10.2.js"></script>
    <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
    <link rel="stylesheet" href="/resources/demos/style.css">
    <link href="~/Content/Menu.css" rel="stylesheet" />

    <script src="@Url.Content("~/Scripts/jquery-1.10.2.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-1.10.2.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-2.1.0.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-2.1.0.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-migrate-1.2.1.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-migrate-1.2.1.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery.maskedinput.min.js")"></script>
    <script src="@Url.Content("~/Scripts/Menu.js")"></script>

    <script src="@Url.Content("~/Scripts/main.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-color.js")"></script>

    <script src="@Url.Content("~/Scripts/Util.js")"></script>
    <script src="@Url.Content("~/Scripts/Pesquisa/Pesquisa.js")"></script>

Aqui dá o erro citado acima:

$("#txtCnpjPesquisa").mask("99.999.999/9999-99");

Como resolvo.

Minha função jquery

jQuery(function ($) {
    //$("#date").mask("99/99/9999");
    //$("#phone").mask("(99) 999-9999");
    //$("#cep").mask("99.999-99");
    //$("#cpf").mask("99.999.999-99");
    $("#txtCnpjPesquisa").mask("99.999.999/9999-99");
});
<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
    <script src="//code.jquery.com/jquery-1.10.2.js"></script>
    <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
    <link rel="stylesheet" href="/resources/demos/style.css">
    <link href="~/Content/Menu.css" rel="stylesheet" />

    <script src="@Url.Content("~/Scripts/jquery-1.10.2.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-1.10.2.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-2.1.0.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-2.1.0.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-migrate-1.2.1.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-migrate-1.2.1.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery.maskedinput.min.js")"></script>
    <script src="@Url.Content("~/Scripts/Menu.js")"></script>

    <script src="@Url.Content("~/Scripts/main.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-color.js")"></script>

    <script src="@Url.Content("~/Scripts/Util.js")"></script>
    <script src="@Url.Content("~/Scripts/Pesquisa/Pesquisa.js")"></script>

Aqui dá o erro citado acima:

$("#txtCnpjPesquisa").mask("99.999.999/9999-99");

Como resolvo.

<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
    <script src="//code.jquery.com/jquery-1.10.2.js"></script>
    <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
    <link rel="stylesheet" href="/resources/demos/style.css">
    <link href="~/Content/Menu.css" rel="stylesheet" />

    <script src="@Url.Content("~/Scripts/jquery-1.10.2.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-1.10.2.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-2.1.0.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-2.1.0.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-migrate-1.2.1.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-migrate-1.2.1.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery.maskedinput.min.js")"></script>
    <script src="@Url.Content("~/Scripts/Menu.js")"></script>

    <script src="@Url.Content("~/Scripts/main.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-color.js")"></script>

    <script src="@Url.Content("~/Scripts/Util.js")"></script>
    <script src="@Url.Content("~/Scripts/Pesquisa/Pesquisa.js")"></script>

Aqui dá o erro citado acima:

$("#txtCnpjPesquisa").mask("99.999.999/9999-99");

Como resolvo.

Minha função jquery

jQuery(function ($) {
    //$("#date").mask("99/99/9999");
    //$("#phone").mask("(99) 999-9999");
    //$("#cep").mask("99.999-99");
    //$("#cpf").mask("99.999.999-99");
    $("#txtCnpjPesquisa").mask("99.999.999/9999-99");
});
Fonte Link
pnet
  • 14,9mil
  • 34
  • 113
  • 249

Erro de: Uncaught TypeError: undefined is not a function

<link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
    <script src="//code.jquery.com/jquery-1.10.2.js"></script>
    <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
    <link rel="stylesheet" href="/resources/demos/style.css">
    <link href="~/Content/Menu.css" rel="stylesheet" />

    <script src="@Url.Content("~/Scripts/jquery-1.10.2.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-1.10.2.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-2.1.0.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-2.1.0.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-migrate-1.2.1.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-migrate-1.2.1.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-ui.min.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery.maskedinput.min.js")"></script>
    <script src="@Url.Content("~/Scripts/Menu.js")"></script>

    <script src="@Url.Content("~/Scripts/main.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery.js")"></script>
    <script src="@Url.Content("~/Scripts/jquery-color.js")"></script>

    <script src="@Url.Content("~/Scripts/Util.js")"></script>
    <script src="@Url.Content("~/Scripts/Pesquisa/Pesquisa.js")"></script>

Aqui dá o erro citado acima:

$("#txtCnpjPesquisa").mask("99.999.999/9999-99");

Como resolvo.