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
answer774
viewsChange image by clicking, when clicking again return to initial image
I need to change the icon every time I click and keep that other icon until I click again, then it goes back to the initial icon. How do I do this? Below is the code I’m using to create this menu.…
-
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.…
-
2
votes1
answer293
viewsAll tabs appearing when updating page materialize
Does anyone know why this happens? When I refresh the page a part of the following tabs appears and then disappears when it finishes loading. I want to prevent that from happening. HTML <section…
-
2
votes2
answers442
viewsiterate array with element id to display/hide
I have several arrays that hide or display event-based fields change of a select, the problem is that when iterating the array with the element id only the last value of the array is displayed, as…
-
2
votes3
answers1214
viewsInput date ta in English
I made an input date of the bootstrap and it ta in English, there is some way it stay in en? HTML <link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen"> <link…
-
2
votes1
answer769
viewsSend form without Ajax and without updating page
When you want to send a form without updating the page, you think of Ajax, which is a practical way to do this. But there would be another way to do it without using Ajax? For example, I have the…
-
2
votes1
answer91
viewsDecision structure, how to know which to use?
On good logic practice: I have a Dropdownlist with 8 values and depending on what is selected will add/remove components from a page html, where it is manipulated via jQuery Now my question is, what…
-
2
votes2
answers898
viewsUpdate with ajax in Laravel
I have a project in Laravel and I want to make sure that when the user type something in the text field, when taking the focus of the field he makes a request ajax to the server to update the…
-
2
votes3
answers397
viewsHow to select a tr element in the middle of "N tr’s" in jQuery?
It has a mounted table, which each row of it is added dynamically. So, inside the <tbody> is added the <tr's> (lines). Inside the three, there’s the <td's> and each <td> has…
-
2
votes1
answer695
viewsWebcontrol input text mask
I created a Usercontrol called Ucldatavigencia very simple. Only one label and two Texts input that will be responsible for receiving a start date and an end date. I would like to apply a mask to…
-
2
votes2
answers214
viewsSet dynamic height for div with javascript
I’d like a script that takes my div with the class master and define height: 100% according to screen size. html: <!DOCTYPE html> <html lang="pt-br"> <head> <meta…
-
2
votes2
answers177
viewsSmooth height change
I’m making a Navbar where it will decrease the height and change the color in the scroll event. My problem is in making this transition smooth. I managed to do for the color, but not for the height.…
-
2
votes1
answer38
viewsFirefox error to focus input, after element Blur itself?
I need the input to stay in focus after the blur if you do not comply with the request. The data of this form are dynamic are created after a consultation ajax, here in the snippet the code worked,…
-
2
votes4
answers2044
viewsI have a fixed menu, how to do anchoring (#internal links) get below the menu?
I am working on a site that has a navbar and a menu (the height of the two summed gives 101px), that as you scroll up to them, they fixate on the top of the screen and stay floating. I’m hoping that…
-
2
votes1
answer4998
viewsGrab ID of clicked element
I have a DIV and this DIV has some checkbox with ID and I want to know how I get the checkbox id clicked. <div> <input type="checkbox" id="0" value="false" name="ckb0"> <label…
jqueryasked 6 years, 8 months ago Andersson OS 107 -
2
votes2
answers236
viewsJquery - Having 2 menu(hamburger), how to close one menu while the other is open?
Good afternoon to all! I made a structure where in mobile I need to show 2 menu’s, but when clicking on a precise one the other closes and I’m not able to do it, currently I can only open and close…
-
2
votes2
answers134
viewsToggleclass is not working
I’m trying to create a list of elements with elements hidden inside each tag li. When you click on li, the hidden elements appear, but when I click again they do not close. This is the JS code:…
-
2
votes1
answer496
viewsHow to "copy" text from one div to another with Jquery?
I’m organizing a player to put on my website. As I don’t know much about JS/JQ, I took a simple model on the internet, put together a layout and adjusted the script to my liking as far as I could.…
jqueryasked 6 years, 8 months ago Thiago Soubra 341 -
2
votes1
answer51
viewsAjax return error - Json format with PHP
Good evening. I am unable to find the error. I intend to build a list as I enter the date in the input date. Below is html: <div class="form-group"> <label…
-
2
votes2
answers2468
viewsExpand/collect table content by clicking on title
I have a table, I want when loading the page to have its hidden content, and when clicking on the title (in the example below awaiting) then load the content, and again by clicking on the title the…
-
2
votes1
answer791
viewsI need to change the border color of a datatable cell
I need each cell in the first datatable column to change color as the table is scaled. The color will be defined as the table data is generated in the back-end. Below is an example of how accurate:…
-
2
votes1
answer231
viewsTake the previous element’s margin and add one more value to the next
I have the following code: <script> $(document).ready(function() { $("div#bloco div").css({ "background-color" : "red", "height" : "50px", "width" : "50px" }); $("div#bloco…
-
2
votes2
answers133
viewsCommit only one element of two with the same name
I have a form, and in this I have to inform the neighborhood, however the element that stores the neighborhood information may vary according to the value of the city selected previously. Example:…
-
2
votes3
answers693
viewsHide and reveal text using Javascript
I have a div that has news, I need to hide a part of the text when the file is read by the browser, in addition the user can see the full text if he wants to click on "See More" which is a tag…
-
2
votes1
answer647
viewsHow to show and hide element according to scroll?
I want to hide the image when the scroll page is larger than 147, so far so good, the problem is that I can not hide the image again when the scroll is less than 146. The goal is to hide and show…
-
2
votes4
answers1977
viewsSelect All checkbox by clicking a checkbox
I looked for the solution here in the forum, however they did not work. I want to select all the checkbox by clicking only 1 checkbox (selects all). Follows my code: <script…
-
2
votes2
answers124
viewsli’s up and down one after one
So I have this ul HTML <div class="atividades"> <ul> <li">Agência Funerária</li> <li>Funerais</li> <li>Cremações</li>…
-
2
votes4
answers745
viewsSort Divs by date in dd/mm/yyyy format
Does anyone know how I can sort a set of Ivs through a date present in their content? for example: <div class="box" id="box1"> <div class="date">01/05/2018</div> </div>…
-
2
votes0
answers31
viewsAutocomplete comJQuery querie Estruturada
I needed to do a query that worked as the following example: In the print you can see that by typing an item, returns structured by neighborhood and then city. I wanted to know how to do my query…
-
2
votes1
answer84
viewsTable populated via bank coming with empty field
I’m populating a table via a select I have in my file selectUser.php. selectUser.php: <?php require "conexaoBD.php"; $nome = $_GET["nome"]; try { $pdo = new PDO($server, $dbuser, $dbpass); $sql =…
-
2
votes1
answer493
viewsLink with Anchor
I’m making a website and I have a link that, in addition to sending a message when it is clicked, uses an anchor to put the section of the site in the spotlight. I’m doing it this way: <a…
-
2
votes2
answers86
viewsAjax does not work when it comes from a form select
When the #sectionChooser comes from Ajax or does not work select #neighborhoods to put the #street, where would be the problem? Html <div class="col-sm-6"> <label…
-
2
votes1
answer2032
viewsClear select element with Javascript
I have this select field: <div class="control-group"> <select runat="server" onclick="ClearOptions(this);" name="txtpesquisa" id="txtpesquisa" class="form-control.selectize-control">…
-
2
votes2
answers83
viewsInsensitive search when typing in INPUT
I have the Javascript search engine below. The problem is that when I write the word "Tomato" he seeks the word "Tomatoes". It’s probably a sensitivity problem or it’s just picking up part of the…
-
2
votes2
answers31
viewsWhen they arrive at the first and last sliders put the slides all as . active
I have the following slide below: $(document).ready(function(e) { const blocos = $("div.slider div.slide div"); function startslider() { ativa = $(".ativa") if (!$(ativa).next().length) { ativa =…
jqueryasked 6 years, 6 months ago Carlos Rocha 1 -
2
votes2
answers67
viewsHow to execute a function whose name was passed as a parameter of another function, à la callback?
I created this function in order to abstract the calls $.ajax() to be performed at various different times. One of its parameters is the name of one of the functions I would like to be performed in…
-
2
votes1
answer347
viewsChange the HTML attribute in the option with JQUERY
I’m trying to change the value of the select with the option to "disabled" but only when the user clicks the input field. See the image to understand better: I want to exactly leave disabled the…
-
2
votes1
answer235
viewsValue in input element is not displayed - (although value is being loaded correctly ) - Jquery
Hello! I am returning an object through ajax and assigning the values to the respective fields. Using as example the title field: $('#txt_titulo').val(objeto_menu.titulo); However, I noticed…
-
2
votes1
answer1545
viewsPosition focus in a field of a modal window - Javascript and Asp.net MVC
I have a view model that has a block that opens modal windows for CRUD actions. I have 4 partial viewls: create, delete, Details and Edit ... All have the Description (Description) field in common.…
-
2
votes1
answer810
viewsTake data-attr value and insert into another element
I have a dynamic listing with PHP, and when you click on a "< tr> " of the table that is listed, you should open a modal with various information. What I intend to do, is to assign certain…
-
2
votes1
answer66
viewsMicrosoft Edge passing strange characters in AJAX call
I have an Ajax call on a web system, where you specify a date of dismissal, and fire an employee on that date: data is the parameter that comes with the Ajax call. When I test in Chrome or any other…
jquery ajax google-chrome character-encoding microsoft-edgeasked 6 years, 6 months ago Artur Trapp 5,175 -
2
votes1
answer77
viewsGenerate next sequence of an "Indice"
I’m having a problem generating a sequence for an "Indice". As an example, if I took the number 1.2, I wanted to generate the number 1.2.4 as a sequence or if I took 1.2.2 I wanted to generate…
-
2
votes2
answers4419
viewsValidate fields with jQuery
I have a function in jQuery, that when the user clicks on the button next he fires an e-mail. When you click the button I need it to check the fields Name, Email and Telephone have been completed…
-
2
votes1
answer28
viewsAjax, HJS and Mustache
I don’t like writing HTML in Ajax, like this... var orderTemplate = "" + "<li data-id='{{_id}}'" + "<p><strong>Nome:</strong> <span class='noedit nome'>{{ nome…
-
2
votes1
answer65
viewsInsert array from ajax into mysql database
I have this ajax that shows the items chosen in "checkbox" form. $(document).ready(function(){ $('#submit').click(function(){ var languages = []; $('.get_value').each(function(){…
-
2
votes4
answers283
viewsToggle header colors based on menu Hover
I have a traditional header, with logo and links menu, I would like to change the header colors based on the Hover of each link in the menu. h1 { padding: 0; margin: 0; color: #fff } header {…
-
2
votes1
answer50
viewsStoppropagation with right click / right click
With this code I can stop the spread of a dropdown menu by clicking on the document. It works very well. Now I would like to accomplish the same thing, but with the right click. The magic happens…
-
2
votes1
answer343
viewsswap the attribute value with jQuery
I got the following js: $("a.bloqDesbloq").click(function() { $.post ("../_requeridos/alteraAdministrador.php", { idAdministrador : $(this).attr('idAdmin'), bloq : $(this).attr('bloq') },…
-
2
votes1
answer529
viewsJquery - Trying to clear a select
I have two dropdowns (select in html) one of UF and one of cities, when selecting a state I want to trigger a function to fill the dropdown of cities, receiving the state id as parameter. It is…
-
2
votes2
answers91
viewsRemove click with Jquery after clicking another element
Every time I click on label that’s inside flags he must apply a background-color. It’s working. What happens is that when I click on a div, it applies the background correctly, but when I click on…
jqueryasked 6 years, 6 months ago Felipe Viero Goulart 3,693