Most voted "jquery" questions
jQuery is a Javascript library focused primarily on DOM handling, event management and Ajax, seeking to free developers from directly dealing with a number of browser compatibility issues.
Learn more…11,371 questions
Sort by count of
-
2
votes1
answer15321
viewsSelect change jQuery
I have the following script: $("#tp_pagamento").change(function(){ var tp_pagamento = $(this).val(); $.ajax({ url: BASE_URL + "ajax/lista_integrador", type: "POST", data:…
jqueryasked 7 years, 4 months ago Sr. André Baill 6,946 -
2
votes3
answers406
viewsDisable input sequence with jQuery
Good in the example I posted I can disable the input valor1, vendedor1 and supervisor1 by checking the option recalcular1. The problem is that I have a form with several input, and to avoid a very…
-
2
votes2
answers116
viewsHow to use a tag property, using Jquery
I have a dynamically filled component <select id="selectTeste"> <option value='1' exigeIdade='true'>item 1</option> <option value='2' exigeIdade='true'>item 2</option>…
-
2
votes1
answer998
viewsHow to show result via ajax and jquery without refresh happening on the page
I tried to implement an Ajax call in a project and I can’t identify the error. I have a form for posting status and I would like that as soon as I post something it does not refresh the page but…
-
2
votes3
answers1085
viewsHow to insert row at the top of a table using JS?
I use the code below to insert a row in a table: var linha = "<tr>"; linha += '<td class="cnes">' + cnes + '</td>'; linha += '<td class="cbo">' + cbo + '</td>'; linha…
-
2
votes1
answer114
viewsForm Zera values greater than 999.99
I’m going through a problem I’ve never seen before. I’m hoping someone has seen it and can help me. I’m working with Asp.net mvc 5, and sending a form via post to my controller. My model: <div…
-
2
votes1
answer102
viewsAutocomplete locking the database
I am developing an application in PHP and Jquery with the Codeigniter 3 framework. I am using Postgre and I have a database with more than 1 million registered records. I made an autocomplete that…
-
2
votes0
answers88
viewsProblem with jQuery filter?
I have this filter in jQuery: var aeroportosida = []; Filtro.prototype.filtroAereoNomeIda = function(value){ var dataa = JSON.parse(JSON.stringify(this.data)); aeroportosida = []; if(value.length ==…
-
2
votes2
answers310
viewstrigger Function after form validation
I have a form with validation, and I need to enter after validating this form a waiting hourglass (as if loading the page). I would like to know how to join these two functions, and after validating…
-
2
votes1
answer548
viewsIncrement dynamic input name with jquery
I have a table that generates the line dynamically by clicking a button. I need the Names to be incremented when generating a new line. Ex: name="product1" name="amount1" name="price1" name="total1"…
-
2
votes1
answer367
viewsHow to send JSON to PHP?
How to send this object by ajax, and read on php? //Aqui crio o objeto com os inputs var obj = new Object(); var objectsRadio = $('input:checked').map(function(i){ obj.id_varejo = id_varejo;…
-
2
votes1
answer1081
views -
2
votes2
answers4025
viewsJquery UI autocomplete JS input
Hello I have a problem here when I create an input dynamically and it should work the Widgets autocomplete jquery ui. I saw several forums and they show how to make it work, but my problem is that…
-
2
votes1
answer1256
viewsRun Mysql search after opening Modal
Guys, yesterday with the help of Bruno here on the page I managed to solve my need to create the modal but today I have a new difficulty, I could not pass over. Next with my modal opening through…
-
2
votes2
answers166
viewsLoading on top of the map
I have the following code drawn 2 polygons on the map. See: function initialize() { // Define the LatLng coordinates for the polygon's path. var bounds = new google.maps.LatLngBounds(); var i; var…
-
2
votes3
answers6461
viewsExchange CSS classes with simple Jquery function
I have a dropdown menu and in the corner of <li> I have an icon of the Font Awesome which symbolises an upward-facing arrow (fa fa-level-up pull-right) and when the user clicks on this…
-
2
votes1
answer360
viewsPlaces image inside an array
How can I place an image inside an array, so that it also appears in auto-complete? jquery $(document).ready(function() { $("#country").typeahead({ source: function(b, a) { $.ajax({ url:…
-
2
votes1
answer353
viewsHandling synchronous and asynchronous request results
I have a function that triggers an ajax request for a route, see: var getInstituicoesSemUsuario = function(tipo) { var resultado = ""; $.ajax( { url: "{{path_for('instituicao.sem.responsavel')}}",…
-
2
votes1
answer928
viewsCheck checkbox only when checked
I am checking a check box to see if you have a type="radio" selected. The problem that check is running the calculation even when I uncheck the check box. I did the following test to see what was…
-
2
votes5
answers7507
viewsChange function of onclick
Guys I’m having a question. I have a button: <button type="button" class="btn btn-success btn-xs" onclick="vincularContato($(this))"><span class="glyphicon…
-
2
votes1
answer342
viewsPut multiplication result in another input and add Totals
My goal is to display the sum of Inputs in the Total Column in the "Total Order" input, where the Acrescimo (will be passed in decimal form (%)) and the discount value (will be passed in decimal…
-
2
votes1
answer227
viewsSum input fields in Table
My goal is to display the sum of Inputs in the Total Column in the "Total Order" input, where the Acrescimo (will be passed in decimal form (%)) and the discount value (will be passed in decimal…
-
2
votes1
answer83
viewsCountdown JS not working on safari
I’m developing a website with a countdown. The code works well on the desktop and the timer starts counting perfectly in Firefox and Chrome, but in mobile, specifically in iphone, Safari browser,…
-
2
votes1
answer88
viewsEvent delegation only once, in a 'dynamic' scenario
I have a function hello() whose argument is the return of an ajax call: function hello(msg) { alert(msg); } $.ajax({ url: 'example.com', data: data }).done(function(resp) { // abre_modal // apenas…
-
2
votes1
answer46
viewsJquery does not take input value
$(document).on('click','#submit',function(){ console.log($('#prescricao[qtd][1]').val()); }); <script…
-
2
votes3
answers228
viewsDoubt Warning in Javascript
I was looking for a function to display an alert message to the user when he leaves the page and I located this one on the forum: <script> // Script de Alerta ao fechar a pagina...…
-
2
votes4
answers6294
viewsMask with Jquery changing from fixed to mobile or vice versa
I have a Jquery mask for phone, depending on how much information the user type I understand whether it is mobile or landline. The mask for fixed: (55)9999-9999 cell phone: (55)99999-9999 the code…
-
2
votes1
answer125
viewsTake data-Cod element value
How do I get the value of the data-Cod element? $(document).ready(function() { $('.chatUsuariosLista').click(function() { $("#para").val(this.id); }); }); <script…
-
2
votes1
answer1970
viewsDestroy active session after browser close
I have a system from which I need the session to be active due to an internal tool, but some users are leaving the system by directly closing the browser, without clicking the button Come out…
-
2
votes2
answers453
viewsFocus on the last Jquery character
I need when the field gets the focus, the cursor to be in the last character. The way the cursor is at the beginning of the field even if the field is not empty. function gravaObs(unidadeObs) { var…
-
2
votes1
answer709
viewsValidation of input type date dates with jquery
The code below for date comparison works for if condition >= and Else. function validaDatas(){ var dataInicial = new Date($("input[name='datainicial']").val()); var dataFinal = new…
jqueryasked 7 years, 3 months ago user60252 -
2
votes1
answer436
viewsModal bootstrap
I’m building a mobile app using Asp.net (aspx) and modal bootstrap. The purpose of this modal is to fill in a label with the information contained in the href "date-mark" attribute that triggers…
-
2
votes1
answer145
views2 clicks to open the Popover again
I’m creating a popopver where I inserted a close button. As shown below in the image: HTML: <div class="dropdown" style="float: right;"> <button type="button" class="btn btn-default btn-xs…
-
2
votes3
answers1147
viewsWhat is the difference between . on('input') / . on('Paste') / . on('change')?
I was trying to do a validation but with the .on('input') it works better than the .on('Paste') (I needed to put a timeout to make it work), can anyone explain to me the difference between the two?…
-
2
votes1
answer12636
views -
2
votes1
answer5877
viewsDjango - Mascara CPF, DDD and phone number
I need to put a mask on the number, ID number and phone number. I am a beginner in Python and Django and would like to know how I can present this mask at the time of typing: For CPF:…
-
2
votes2
answers83
viewsJquery does not exclude rows from the table
I have the form below which when I click Add more Pet, he adds one more panel normally: But when I click Remove, it removes only buttons and panels continue. See code: <table border="0"…
jqueryasked 7 years, 3 months ago user24136 -
2
votes1
answer36
viewsHow to divide all span . class by 3
How to make these divisions and get different results for each division. The result is right only for the first price and the other results are all the same: 200. $(document).ready(function() {…
-
2
votes1
answer33
viewsPrint with setInterval in the same place
I need it when "filling..." is printed by setInterval, whether it’s exactly the same place as the first impression. It turns out it’s going down or forward. There is how to do this, print several…
-
2
votes3
answers664
viewsRequired no Ajax
I have a code that I need that when submitted, some fields are mandatory to be filled in, type o required html only in Ajax, instead of using Alert as I am using, it uses required as in html. Follow…
-
2
votes1
answer83
viewsTreating logic and exceptions - jQuery
I have some buttons which on onclick of them work with two Ajax requests for an external file that add products, but this is not of utmost importance in this issue. My problem is this: if the buy…
-
2
votes2
answers488
viewsSelect values of a <td> with click
The code below is for a page, which the user enters the name of a city, and checks if there are similar results. With this, it brings several results in a table created dynamically, depending on the…
-
2
votes1
answer674
viewsColor change in graph with Chartjs not working
Could you help me in the case below? I’m trying to change the color of the chart to red, but the change isn’t working. Code: function Devolucao() { if (CicloAtual != "") { var codCli =…
-
2
votes1
answer49
viewsYou can insert new HTML with Pure.js
I’m looking to use the Pure.js framework to create a post via json. I found it on the Stack platform in English this topic, which is what I want to do, only that there’s a problem, I’m not being…
-
2
votes1
answer145
viewsFunction . Unload() - jQuery
I make two ajax requests to an external file from which they add and remove products, but that’s not very relevant in this issue. I wanted every time the page was updated, the function…
-
2
votes1
answer657
viewsRun Function when the element appears in the gift
How to run a function where a particular item exists in the DOM? For example, I have a list with 4 elements, and whenever a new element appears I want to run a certain function. Example code below:…
-
2
votes1
answer79
viewsDoes anyone know a simpler way to do this effect, getting the text instantly when typing in an input
<html> <head> <script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> …
-
2
votes1
answer978
viewsHow to change the image of the mobile menu icon to indicate toggle closure?
I’m creating a responsive menu from scratch using html, css and jQuery. I was able to create it and it is working toggle opening and closing after function click on an image (the menu icon). The…
-
2
votes2
answers111
viewsSelects nested in jquery or javascript?
I have a dynamic table with split split split and would like to change the values of selects based by its predecessor, example. If you select the first item you would like the subsequent ones to…
-
2
votes1
answer100
viewsjQuery - Id() and show() does not run correctly
I have items of which in a paragraph is displayed the total of them. When I remove one of these items, I am working with 2 paragraphs with the same code so that I hide one and show the other, so…