Questions tagged as 'jquery'

2
answers

Jquery does not execute because of syntax

I looked at my syntax and at first it's true: $(document).ready(function(){ $('input[placeholder], textarea[placeholder]').focus(function(){ if($(this).val()==$(this).attr('placeholder')) $(this).val(''); }).blur(function...
asked by 13.04.2015 / 09:43
3
answers

Adding current class to the menu

I'm having the problem in my JS it's adding the Current class to all #li. html <ul id="navlist"> <li id="home"><a href="/">Home</a></li> <li id="sobre"><a href="/sobre">Sobre</a> &...
asked by 26.03.2015 / 14:38
1
answer

AJAX request gives error and status "canceled"

I have this code: $("#go").click(function(){ var email = $("#email").val(); var password = $("#password").val(); $.ajax({ dataType:'html', type: 'post', data: 'email=' + email + '&password=' + password...
asked by 09.07.2014 / 04:22
4
answers

How to clear html form fields? [closed]

javascript variables that reference each field in my form var checkbox = $('input:checkbox[name^=check]:checked'); var categoriaVeiculo = $("#codCategoriaVeiculo").val(); var descricaoVeiculo = $("#descricaoVeiculo").val(); var pla...
asked by 27.02.2015 / 20:54
2
answers

Know the last index of a .each

I'm running a .each and would like the last position to have a alert . For this I am trying to get the last position of index : if (index == len - 1) { alert("Última posição"); } Complete code: $.getJSON("/Contrato/...
asked by 23.07.2014 / 17:45
1
answer

Get all divs with jquery

I have several divs in my site, where they contain the following class "code $ numb" where $ numb is a random number, how can I capture all the divs with the code regardless of $ numb?     
asked by 08.07.2014 / 22:51
2
answers

fade in / fade out does not run

<script type="text/javascript"> $(document).ready(function () { alert("ready"); $("#comentario").fadeIn(1000); $("#nome").fadeIn(2000); $("#foto").fadeIn(4000); $(".back").click(function () { $("#comentario").f...
asked by 15.10.2014 / 06:37
1
answer

Get Page HTML and Send to Controller

Hello, I'm trying to get all the page html from the tag and send it to my controller, but I'm not getting it, it follows used code. function exportarExcel() { var url = '@Url.Action("ExportExcel")'; var html = $("body").html();...
asked by 18.10.2018 / 13:36
2
answers

How do I update a page at a set time?

I need to refresh a page every 15 minutes, but with a set time (HH: 00 | HH: 15 | HH: 30 | HH: 45). I tried to do this ... <script> $(document).ready(function () { // Handler for .ready() called. windo...
asked by 07.12.2018 / 12:44
2
answers

Catch custom data-attribute attribute within a loop

I want to select all custom attributes and do a validation with them, but I do not know how I can get the value of "attr" inside a loop, since they are being iterated. HTML example: <input type="text" data-selected="teste" value="fulano"...
asked by 09.12.2018 / 16:20