Questions tagged as 'jquery'

4
answers

jQuery delete the last entered character in an input

I would like to know how to delete only the last letter entered in an input field. All the examples I've found are cleaning the whole field.     
asked by 27.07.2017 / 18:27
2
answers

Why does not this setTimeout work?

My goal is when I click the button, 3 seconds later a div reread page ... Why does not this code work? <button id="btn-cadastra-tarefa" ng-click="adicionaTarefa()" onclick="atualiza()" type="button" data-dismiss="modal" &...
asked by 28.07.2017 / 14:44
4
answers

Capture form data and transform to UPPERCASE

I have input: <input id="id_nome" name="nome" type="text" class="form-control input-style" style="text-transform: uppercase" autofocus required> I have the following function in Jquery: $(function () { $('.form').submit(fun...
asked by 13.07.2017 / 17:14
4
answers

Ajax, limit time even by reloading the page

I have the code that does what it has to do, and at the end it hides the button and shows the message of success: function getFollow() { $('#btnFollow').click(function(a) { a.preventDefault(), $('#btnFollow').html('Ganhando seguidores.....
asked by 29.07.2017 / 14:21
3
answers

Getting input value with jQuery

I can not get the value typed in an input field with jQuery: HTML: <input type="text" id="vendaMediaMensal" name="vendaMediaMensal"> jQuery: var vendaMediaMensal = $("#vendaMediaMensal").val(); $("#vendaMediaMensal").focusout(...
asked by 28.05.2015 / 21:49
2
answers

How to know which version of the browser dynamically?

I'm doing a project in CORDOVA using basically HTML, CSS, JS. But in some cell phones the image of some icons are becoming their natural size and in others not, I have basically used vh to define the size of the images. To test this I am...
asked by 05.07.2016 / 14:32
2
answers

How do I save the option chosen by the html user in cookie? [duplicate]

I have a background change system by Javascript on my site, and I want it when the user chooses the background they want, the background he chose to hold when he accesses the site again. JavaScript function mudar9(){ document.body.backgro...
asked by 14.09.2014 / 15:56
2
answers

Calculate the average of a result group

I have a results group and I need to calculate their average, how do I do this in jQuery? The elements are already in variables and separated by classes, for example: deztotal = parseInt($this.find( ".dezmembros" ).html()); My HTML: &l...
asked by 19.07.2014 / 02:06
3
answers

Comparing 2 password fields if they are equal

I have a password field and confirm password, I want to check if both are the same. NOTE: There is an autocomplete OFF for the email field $(document).ready(function () { $('#txtEmail').attr('autocomplete','off'); if( $('#txtSenha'...
asked by 01.12.2014 / 13:04
2
answers

Error while using replace

I'm using the replace, but when I pass the number 1 or 12 to it the error. For example: $(this).data('qtde').replace(/\./g, "") Passing the value 1,223,44 works, when step 1 gives the following error:    Uncaught TypeError: $ (...).   HT...
asked by 08.02.2018 / 19:58