Questions tagged as 'jquery'

2
answers

How to identify changed value in input

How to identify if a setting value has changed in input ? I have the prototype below, however, the alert will be displayed according to the number of times the class="ultimo-valor" appears in the code. <input class="ulti...
asked by 20.01.2017 / 23:02
1
answer

Close modal bootstrap automatically when submitting form

I have a modal bootstrap that has a contact form: HTML:              Thank you! Your form has been successfully submitted and will be answered as soon as possible.              <div class="modal fade" id="contactModal" tabindex="-1"...
asked by 13.01.2017 / 01:21
2
answers

JavaScript does not take on pages added later

I have a problem, which gives me a big question. I'm developing a website that has a default structure, which makes GET calls in Jquery to fetch new HTML pages for certain parts of the page. Example: I click on a link and the page c...
asked by 24.03.2016 / 01:06
1
answer

Javascript set value of one field in others

I have the following code below <script type="text/javascript"> function getValue() { var x = document.getElementById("NuJaneiro"); document.getElementById("NuFevereiro").value = x.value; } </script> <td...
asked by 17.12.2015 / 18:35
1
answer

How to calculate Total via JavaScript

To show the items in a sale I use a Json to display the data using this script. <script> $(document).ready(function () { var CodigoVenda = @ViewBag.CodigoVenda; $.ajax({ type: "GET", url: "/Venda/GetDadosIte...
asked by 30.11.2015 / 21:04
1
answer

jQuery execute a single action (method) for multiple elements

I have a form where an action can be executed multiple times by different elements, I would like to know if I can put everything in a single call. For example: $("#campo_01").change(function(){ $("#frmForm").submit(); }); $("#campo_02").c...
asked by 24.11.2015 / 22:20
1
answer

Set CSS style for already filled fields

I have the following function in javascript: $('input').blur(function() { var $this = $(this); if ($this.val()) $this.addClass('used'); else $this.removeClass('used'); }); It adds the class used to the element i...
asked by 22.11.2015 / 04:00
1
answer

How do I not select select an option already selected in another select?

How to make select not allow that the option "Lider" is not duplicate , because in my business rule only one user can be a leader . I thought of the following: Assuming I have 3 selects. If I select one of them as LEADER , and select...
asked by 29.11.2016 / 18:12
1
answer

How to transform the text of a div into rows with p

Suppose you have a div , and you have huge text in it, and you would like each line to be transformed into <p> . How would it work? What I really want is, at the beginning of each line of the div that has >...
asked by 01.02.2016 / 18:00
2
answers

Add an "active" class to the link according to the page accessed?

I'm setting up a theme for WordPress , and I need to add an active class in anchors , it works as follows: I retrieve the URI from the current page and compare it to the text / value contained within the anchor that is automatically fe...
asked by 28.01.2016 / 18:48