Most viewed "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
-
27
votes4
answers141141
viewsHow to redirect the user to another Javascript/jQuery page?
I would like to know what methods of redirecting exist in Javascript, and also using jQuery, and if possible, I would like to know all of them.
-
54
votes2
answers126902
viewsWhat is the difference between $(Document). ready() and window.onload?
There is a difference between $(document).ready() e window.onload apart from one being Javascript and the other being jQuery? I see both events are triggered as soon as the GIFT (Document Object…
-
42
votes14
answers126839
viewsPhone Mask Using jQuery Mask Plugin
I need to change the "-" position on the mask. <label for="telefone" >Telefone</label> <input style="width:25%; margin-right:25% " type="tel" name="telefone" id="telefone"…
-
58
votes7
answers115219
viewsMask for CPF and CNPJ in the same field
Hello, I looked for this doubt in the questions, but I could not find it. Well, I would like to make a field have the Cpf and cnpj masks depending on the number of characters typed. Here it doesn’t…
-
29
votes8
answers95476
viewsHow to check with jQuery if there is a checkbox checked?
I would like to know which Checkbox is checked with Jquery. To catch all the checks I made the following code var checado=false; $(obj).find("input[name='analisar']").each(function(){…
-
2
votes1
answer83416
viewsSend a message to Whatsapp via site
I wonder if there is how to send message to Whatsapp through website. Example: The customer is there on the site and there is a field to enter a message and click "send" and I receive the message on…
-
12
votes4
answers80887
viewsHow to force the opening of a link in another tab and not window?
I have a button (anchor) that needs to be 'hidden', or no text. Its structure is this: <a class="testeimprimir" href="javascript:teste1();" target="_blank">TESTE</a> The Function is…
-
45
votes5
answers76380
viewsHow to pin a "horizontal menu" to the top of the window when scrolling the page?
I have a layout with a horizontal navigation bar at the top of the site, it is with margin-top:100px, when scrolling the page the menu should be fixed at the top of the window but with margin-top:0.…
-
4
votes1
answer74733
viewsProblems with: Uncaught Referenceerror: $ is not defined
There is a doubt in this forum here, but it doesn’t solve my problem. I have includes, including include jquery in the first line because link found this: Because, JS interpreter search for $ before…
-
17
votes3
answers72012
viewsGlobal variable in Javascript
How to make a global variable in Javascript? I need the variable that was declared in one function to work in another function. Example: Jsfiddle $("#div3").click(function() { var fill = "a"; });…
-
11
votes5
answers64617
viewsMonetary mask with jquery.inputmask
How do I create a mask for a monetary value? I’m wearing this: $(".ValoresItens").inputmask('R$ 999.999.999,99', { numericInput: true}); was like: R$ ____. ____. _25,00 But I didn’t like these…
-
1
votes4
answers57975
viewsHow to clear html form fields?
javascript variables that reference each field of my form var checkbox = $('input:checkbox[name^=check]:checked'); var categoriaVeiculo = $("#codCategoriaVeiculo").val(); var descricaoVeiculo =…
-
11
votes7
answers57425
viewsCheck/Deselect Checkbox from a button
I would like to use a button to mark/uncheck checkbox. I have this button that calls a function, look: <button class='btn btn-large' type='button' title='Todos' id='todos'…
-
32
votes2
answers55629
viewsCORS - No 'Access-Control-Allow-Origin' header is present on the requested Resource
Good evening, I’m trying to access a server from my local machine and I’m getting this answer: No 'Access-Control-Allow-Origin' header is present on the requested Resource. Origin 'http://localhost'…
-
20
votes4
answers55577
viewsHow to validate client-side CPF with script?
I’m working with a CPF validation on my controller, but I need to validate when the customer leaves the input of the CPF and then return a message warning when the CPF is incorrect, through a alert…
-
3
votes2
answers53582
viewsAccess to Xmlhttprequest has been blocked by CORS policy
I have two Flask applications running locally on my machine. One is running on port 5000 and the other on port 5050. I need to make a 5000 app call to 5050. But I’m having this problem: Access to…
-
11
votes2
answers51084
viewsSliding effect on anchor links
I have a page Onepage and the anchor links of the menus when clicked them only "jump" to the screen section further down, but I wanted them to slide smoothly up to the intended anchoring section. I…
-
8
votes1
answer50369
viewsHow do I get current Javascript url?
I am using jQuery. How do I get the path from the current and complete URL, I want to assign it to the variable url_atual. $("#id_ativo").change(function(){ $.ajax({ type: "POST", url: url_atual,…
-
10
votes1
answer50008
viewsMasks with jQuery: Phone, CPF and CNPJ
I need to create some masks for CPF, CNPJ and phone. The problem is that I have never used jQuery and have never done any of this before. I would like someone to help me because I searched some…
-
39
votes8
answers48548
viewsHow to pass parameters in function calls by reference in Javascript?
I recently asked the question Why should we use Anonymous functions with jQuery instead of the function directly? and along with the accepted answer came a second question: How to pass arguments to…
-
0
votes3
answers48474
viewsGetting input value with jQuery
I’m not getting the entered value in an input field with jQuery: HTML: <input type="text" id="vendaMediaMensal" name="vendaMediaMensal"> jQuery: var vendaMediaMensal =…
jqueryasked 9 years, 11 months ago GustavoSevero 2,567 -
3
votes4
answers47097
viewsTake select value with jquery
I have an HTML code that contains the following information: <select name="QtdAcomodacaoD" id="QtdAdomodacaoDuplo" class="form-control" style="width:130px" onchange="soma()"> <option…
jqueryasked 9 years, 3 months ago user24136 -
2
votes3
answers46606
viewsMask for HTML5 Input fields
I am applying a mask addition feature in my code, even when the user fills the phone or mobile, to chew be filled automatically. However, my page does not return anything while user type.…
-
17
votes8
answers45427
viewsHow to disable the scroll of a web page?
I’ve been trying to disable one-page scrolling. All I have found are type solutions: #container{ overflow: hidden; } But that’s just occult scroll bar. How I would disable scrolling, even with it…
-
18
votes7
answers44529
viewsHow to get only the numbers of a string in Javascript?
I wonder if there are functions that return only the numeric values of a string, if there is not, what is the simplest and efficient way to implement? Example: apenasNumeros("5tr1ng"); Upshot: 51…
-
3
votes3
answers44020
views -
4
votes4
answers43355
viewsCheck if string has only numbers
Which command can I use to know if inside a string only has numbers.. For example, I’m using the prompt: var quantidade=prompt('Quantidade de entrada de produtos(somente números)'); I would like to…
-
101
votes6
answers42802
viewsWhat is the difference between . on("click", Function() {}) and . click(Function() {})?
I usually use it because I learned it was the more correct, the assignment of events as follows: $('seletor').on('click', function(){}); However, I see many developers using the following syntax:…
jqueryasked 11 years, 2 months ago Felipe Avelar 9,507 -
5
votes2
answers42594
viewsHow to open and close modals with jQuery
I’m trying to open a modal, wait 3 seconds and close it inside the $( document ).ready(). When I use $('#myModal').modal('show'); the modal appears but when I do…
-
6
votes3
answers42294
viewsSelect option from a select
I have the following HTML: <select id="faturamento-mes-referencia"> <option value="1">Janeiro</option> <option value="2">Fevereiro</option> <option…
-
83
votes4
answers42074
viewsWhat are the main differences between jQuery and Angularjs?
I am noticing the adhesion of Angularjs and the abandonment of jQuery by some developers, however I do not know the advantages of Angularjs because I have never worked with this framework. Since…
-
5
votes2
answers40895
viewsValidate input to only receive numbers with jquery?
I need this input to receive only numbers: <input class="form-control input-sm " placeholder="número" maxlength="4" type="text" ng-model="numero.nJogo" /> This I need to receive only values…
-
1
votes5
answers38138
viewsFind Jquery Datetimepicker for EN
Hello, I’m trying to lacquer mine datetimepicker for en but am not succeeding. I tried to do the way they teach on the official page but could not. The plugin is working perfectly but with this…
-
8
votes3
answers37193
viewsHow to enable and disable fields by clicking button
I have a page made with bootstrap 3 where I show some fields coming from my BD, now when opening the page I need all fields except a button Iniciar Tarefa are disabled, the button Iniciar Tarefa…
jqueryasked 10 years ago adventistapr 5,498 -
12
votes5
answers36368
viewsTake value from an attribute in td
I have a dynamic table where there are 9 columns In one of the last columns there is a button disapproval, and when I click on it, I wanted to take the name that is inside a td in the same tr…
jqueryasked 10 years, 9 months ago Tafarel_Brayan 415 -
37
votes9
answers34793
viewsInput type="password" with password display eye
I need to put a <input type="password"> with that eye of the reveal password, but it has to work as follows: User clicks on the eye and when dropping hides the characters again. Follow an…
-
7
votes5
answers34006
viewsHow to return the last record of an array with Javascript or jQuery?
I’m making a custom search filter where the user can select the brand and product features and I return their id. But I wanted to return only the last record of mine arrays where they contain all…
-
5
votes2
answers33846
viewsPassing JS values to another HTML page
It is possible for javascript to pass a variable whether it is global or not from one HTML page to another HTML page? index.html receive variable.html Like, any way to save that value and page to…
-
11
votes5
answers33239
viewsHow to make a character counter of a textarea?
I tried to make one, but always ran into some limitation. I think my logic will not work, but I still could not think of another. Javascript: $(document).on("keydown", "#TxtObservacoes", function ()…
-
1
votes5
answers32695
viewsRead and manipulate json data using jquery
They say that Json is simple. But I’m in a lot of pain. Following code: $(document).ready(function(){ $.get( "http://meusite.com/", function(data) { console.log(data); }); }); the result the…
-
9
votes7
answers31206
viewsHow to insert data into DB with jQuery/Javascript without using PHP?
I am learning Javascript and jQuery and I am wanting to make a small site to test the insertion of data in a database. I have no knowledge in PHP, I wonder if it is possible to insert data in a…
-
6
votes5
answers31061
viewsFormat Float value as currency using Jquery
I have a function that sums the values of a line, I would like to know if it is possible to put the value as currency like this: R$ 16,00 It’s coming out this way R$ 16.00 But I wouldn’t want to use…
jqueryasked 9 years, 4 months ago Macario1983 1,335 -
23
votes2
answers29551
viewsSimple paging in jQuery/Javascript
I’m looking for a simple pagination, no CSS styles, nothing like that. Only with the buttons below to change page and with the elements on top. I’m asking because the examples I find are a little…
-
11
votes5
answers29209
viewsReset to input fields after Ubmit with Jquery
By sending input fields values via Jquery to a PHP page I can do the action without "refreshing" the main page but I can’t make input fields "empty" again?!? How to apply "reset" after submission?…
-
2
votes3
answers28262
viewsUpdate DIV Automatically (autorefresh) without updating whole page
I wonder if there is a way to update only one div automatically at each x seconds without having to update the entire page this would be possible?
-
2
votes1
answer27528
viewsCalling Javascript function with onclick with content loaded from div
I have a div that has its contents loaded after loading the rest of the page. It is called by a button via AJAX. I have another button inside that content that would call a Javascript function to…
-
6
votes5
answers27365
viewsRemove jquery field mask
I have this code to put mask on the field: (function ($) { $(function () { $("#txtCnpjPesquisa").mask("99.999.999/9999-99"); }); })(jQuery); Now here I must pass the field…
-
1
votes1
answer27033
viewsClear fields with Jquery
Colleagues. I’m trying to clear the fields after Submit from a form, but I’m not getting it. Look: $(document).ready(function() { $("#resposta").ajaxStart(function(){ $(this).html("Mensagem sendo…
jqueryasked 9 years, 2 months ago user24136 -
2
votes2
answers26842
viewsSimulate a click event without clicking using jQuery
I have a project here with a problem, I’m close to solving but I need a hand from you! At Home, we have a button called "Covers" that when clicked should be taken to the Developments page. On this…
-
1
votes1
answer26624
viewsTake class name and jquery ID
Guys I have the following situation, I do a search on an object behind some classes, as we know the FIND() returns what is inside the selected class, using join with find o each, traversing the…