Questions tagged as 'jquery'

1
answer

How to limit the amount of checkboxes selected?

I have form with 5 (five) checkbox . I would like the user to only be able to check three (3) of those five (5). How do I do this validation using jQuery or Bootstrap? Thanks everyone for your cooperation.     
asked by 20.02.2015 / 06:03
2
answers

Use the callback of a function

$(function () { $("#formulario").submit(function() { var cidade_nome = $('#cidade option:selected'); var ano1 = $('#ano1').val(); var ano2 = $('#ano2').val(); var registro; var param_1; var resposta; $.post('envia.php'...
asked by 12.02.2015 / 22:15
2
answers

Error in uppercase count

I am creating a function in jquery where the user typing their password, this function identifies how many uppercase characters there are in this password, in order to calculate the strength of that password. I even managed to make this f...
asked by 02.02.2015 / 11:58
1
answer

How do I return the weather forecast through the previsaodotempo.org API?

I'm trying to return a weather forecast query through the link API but I'm not getting any success. Where am I going wrong? $.getJSON('http://www.previsaodotempo.org/api.php?city=rio+de+janeiro', function(data){ $('.temperatura')....
asked by 20.02.2015 / 21:52
2
answers

Passing values from checkboxes to an element contained in a div

The example below works as follows: By supplying all the data (name, phone, status, and marking at least one checbox, a button is loaded within <div id="btnSubmit"></div> .) I can retrieve the name (in real time) and inse...
asked by 01.11.2018 / 15:48
2
answers

Add dynamic line values automatically

As the example below, I'm trying to sum the values of the Qtde Transferir lines, which are dynamically generated as the result of the database, subtract from the value entered in the Quantidade a Transferir field and display the di...
asked by 27.01.2017 / 13:52
2
answers

Mount array through a list in ajax

I have an ajax function that consumes a webservice, and returns me a list, how do I get that list and I mount two arrays with the values? JS: function getCars() { $.ajax({ type: "POST", url: "CarService.asmx/GetAllCars", data: "Method...
asked by 16.08.2015 / 18:11
2
answers

Get script from a DIV with JS

It is possible to get the SCRIPT of some element .. EX: <div id="form"> <div class="box"> <p>Pegar apartir da 'class="box"'</p> </div> </div> get the complete code inside the id="form"...
asked by 24.07.2015 / 21:31
2
answers

Javascript or Jquery - how to do an inventory of divs classes

I have a div of id = colors and inside it I have other divs with several classes <div id="cores"> <div class="azul">conteúdo</div> <div class="amarelo">conteúdo</div> <div class="verde">conteúdo&...
asked by 04.07.2018 / 01:53
3
answers

Remove tags JQUERY

I need to remove the HTML tags from a variable, or do not interpret the HTML of this variable. The problem is that the variable has its value coming from an input, so: var msg = $('input').val(); As there is no way to get the .text...
asked by 01.07.2018 / 01:58