1
<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>
Here gives the error quoted above:
$("#txtCnpjPesquisa").mask("99.999.999/9999-99");
How do I resolve.
My jquery function
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");
});
Following the suggestion of Filipe and Guilehermebernal, this became my 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>
why the downvote?
– pnet
Man, what you posted up there doesn’t help, that’s not your code, it’s just the includes. Have you checked if the element with the id "txtCnpjPesquisa" exists? Replace these includes all with your code.
– Filipe Moraes
@pnet, error on top where? Try to be more specific
– CesarMiguel
The error is in this line of my jquery function: $("#txtCnpjPesquisa"). Mask("99.999.999/9999-99");
– pnet
that code is where? inside which file?
– Filipe Moraes
What else do I have to do. When someone doesn’t understand, they vote negative just because they don’t understand the question?
– pnet
@pnet, what is the file
<script src="@Url.Content("~/Scripts/jquery.js")"></script>
? I think you’re including jQuery 5 times... I would take out all but version 2.1 min. And from there I was fixing the problem.– Sergio