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
votes0
answers41
viewsHow to load file. JS depending on the width of the screen
I have a file .js who would like to upload only to Desktop version, when it is on more narrow screens would like the request for that .js were not done, or even another was carried .js. Like, for…
-
2
votes1
answer197
viewspass value of select with array by ajax
I need to pass the information of a select array through ajax but I’m not getting it. My form: <form method="post" id="form1"> <table width="100%" border="0" cellspacing="0" cellpadding="0"…
-
2
votes2
answers742
viewsHow to delete the last row from the table?
<table class="table"> <thead> <tr> <th>#</th> <th>Id.</th> <th>Descrição</th> <th>Qtd.</th> <th>Unitário</th>…
-
2
votes1
answer456
viewsDuplicate inputs with bootstrap
I’m creating a form with tabs and I have to duplicate a set of inputs to another line and wanted help to do this. I’m using bootstrap and there’s the code snippet to be duplicated. <form…
-
2
votes2
answers76
viewsHandling of json in Jquery
I have the following one-page JSON return: { "0":{ "id_user":"10", "contente":"45454545454", "time":"azul", "nick":"ikeda." }, "1":{ "id_user":"10", "contente":"4", "time":"azul", "nick":"ikeda." },…
-
2
votes1
answer224
viewsPass a button id inside a while (in php) to a java script code and print the id inside a modal
I have two buttons in a table that sits inside a while (in php code) and I have a modal outside that while structure. My question is how can I get the individual id inside my table that is inside…
-
2
votes1
answer1524
viewsModal that opens only the first time
I’m new here, I have a modal that opens automatically, I wanted to make it open only the first time for the user. I see you have a way with cookies. It’s just that I’m pretty layabout with jquery…
-
2
votes2
answers70
viewsJavascript or Jquery - how to do a Divs class inventory
I have a div of id=colors and inside I have other Ivs with several classes <div id="cores"> <div class="azul">conteúdo</div> <div class="amarelo">conteúdo</div> <div…
-
2
votes2
answers1318
viewsVisibility of Datatables Column
I’m using the DataTables for display and export of my tables, one of the types of datatables I use and this one: https://datatables.net/extensions/colreorder/examples/integration/colvis.html I…
-
2
votes1
answer40
viewsError incrementing value in inputs with same class?
I have a function that creates a loop of inputs depending on the number of installments entered by the user and when inserting a value in the first one it increases by 1 each of the following…
-
2
votes2
answers757
viewsResponsive Font-Awesome icon - How to replace icons when clicked?
So I’m trying to make those responsive headers that, when clicked, organize the column and change the "arrow" up or down. Currently I already have my Sorts working, but still missing this…
-
2
votes3
answers53
viewsHow not to enable inherited js function?
As you can see in the example below, I have a Collapsible and in the initial structure I have a button/link (example + sign), I would like to be able to press this button and not activate the…
-
2
votes1
answer782
viewsIdentify screen size to load content asynchronously
I have a script that does reload every 10 seconds, loading a page into a div: <script type="text/javascript"> var tempo = 10000; function listar() { $.ajax({ url:"lista.php", success: function…
-
2
votes2
answers648
viewshow to access the class array with jQuery? Take the second class of an element
I’m listing the icons from a list on console.log() they are displayed, however I want to capture only the second classes of icons in a variable, but I don’t know how to access with jQuery the second…
-
2
votes2
answers636
viewsMaterialize Autocomplete does not load values
I’m having trouble loading values into the Materialize autocomplete. What happens is the following: $().ready(function() { $('#sel_estado').change(function() { $.post('auto_cid.php',…
-
2
votes3
answers478
views.is() jQuery - how does it work?
How the function works. is() in jQuery, I saw it being used in a code, the code has a variable $lastClicked, declared, then a comparison is made (!$(this).is($lastClicked)), only that I didn’t…
-
2
votes1
answer123
viewsHow to know if a dynamic <a> has been clicked in javascript
need to know if a certain id of a <a> dynamically created was clicked. formatters: { return " <a href= '#' class='btn btn-warning btnAlterarSolicitacao' data-idSolicitacao='" + row.Id + "'…
-
2
votes3
answers3885
viewsJavascript/Jquery - Calculating days between two "DD/MM/YYYY" dates
Friends, good afternoon... next, the code below, takes two dates in a calendar, in the format of DD/MM/YYYY $('.two-calendars').on('pickmeup-change', function (evt) { var range =…
-
2
votes1
answer33
viewsI cannot click on the - jquery link
Hello, someone can help me posted the code also in codepen, can’t click the link and opened the PDF file, what happens is the slideup of div. Thanks for your attention! (function($) {…
-
2
votes1
answer70
viewsModal does not load Style when initialized automatically
I have a modal that is opened when the application is started, I made the check if it is the first time that the user logs into the system through a cookie. The problem is that when the modal is…
-
2
votes2
answers57
viewsManipulating data from Ajax
Whoa, guys. I have a page that receives JSON data from an Ajax request from so long, in this format: { "status":"success", "total":4, "0":{ "id_user":"11", "posicao":0, "nick":"Usuario",…
-
2
votes1
answer515
viewsNavigation using arrow keys
I need to navigate the DOM through the arrow keys. I can accomplish it when it goes only in two directions (up or down, front or back), but to move in the four directions I did not find a way. I…
-
2
votes3
answers736
viewsjQuery - Field with maximum 4 digits and complete with 0 left
I need a field where 4 numbers can be entered at most, and if the user enters less than 4 digits, the 4 digits are completed with zeros on the front, and does not accept values such as 0, 00, 000 or…
-
2
votes1
answer35
viewsrepetition of content informed by . html()
I inform through JQUERY the link to open a video in a modal <video width="100%" height="400" id="vid_video" controls="controls" style="padding: 0 10px 0 10px"> <!-- AQUI DENTRO VAI O…
-
2
votes1
answer50
viewsSync and corrections by n17t01
How can I join these two ajax into one? I’m making a shopping cart that when you click on the add button in the cart, appears in the div class=account_cart the number of items added and in the div…
jqueryasked 6 years, 3 months ago Wagner Martins Bodyboard 698 -
2
votes0
answers421
viewsUse Select2 to search states and cities
I’m looking to improve the search for cities and states. I did this dynamic with the Select2: /*************** Procurar estado ***************/ $( ".estado" ).select2({ placeholder: "Estado", ajax:…
-
2
votes1
answer76
viewsPlus/Minus jquery does not work
I am unable to change the input value id="value" when you click on .Minus or .plus, what I must do to resolve? <input type="button" value="+" class="plus"> <input id="value" step="1"…
jqueryasked 6 years, 3 months ago Wagner Martins Bodyboard 698 -
2
votes0
answers691
viewsUncaught Syntaxerror: Unexpected token <
I’m consuming data returned from a Web Service JSON, in which I travel array columns, for compare values between Urls and if equal, by its name. We have names of teams, locations, categories and…
-
2
votes4
answers72
viewsRemove Class after Click
I have a class #sidebar-show which, when I click on it, I want you to remove the class d-None to show the div below. I am using Bootstrap. What happens is when I click on #sidebar-show the class…
jqueryasked 6 years, 2 months ago Felipe Viero Goulart 3,693 -
2
votes2
answers53
viewsjQuery - How to add event to control after DOM loading?
I need to add a virtual keyboard after a validation in the codebehind. The control is invisible until this validation is true. When I add the virtual keyboard with the control already visible on the…
-
2
votes2
answers161
viewsHow to give Submit in the data of a dynamically generated form?
<div class="form" id="dynamicDiv"> <p> <div id="principal"> <form method="POST" action='enviaMform.php' id="enviaMform"> <div class="container"> <label…
-
2
votes1
answer97
viewsJquery Pick Value Nearest Checkbox by Line
I need help with the following: I want to take the checkbox that is disabled and play on console 0 for what is disabled, and 1 for what is enabled. My source looks like this: (Asp.net mvc) @model…
-
2
votes3
answers185
viewsUse Jquery to swap text
Good morning! I don’t have access to the HTML of a site I’m editing, so to make additions, I only get it via css or js. Basically I need to change a text from "service", to "Transfer" and to try…
-
2
votes2
answers130
viewsError - Jquery does not load function correctly
The error appeared after I tried to add the . click(Function()) As you can see in the image above, the result is not as expected, which would be that H1 would be orange, with a fadein, and an…
jqueryasked 6 years, 2 months ago Vinicius Borges Lima 101 -
2
votes2
answers44
viewsPass selected values in a select to a div
I am 02 selects that when selecting the city of the first, automatically fills the state of the other. See: <select name='Cidade' id='cidade' class="form-control" required='required'>…
jqueryasked 6 years, 2 months ago user24136 -
2
votes4
answers1366
viewsCreating elements with jQuery
How to create elements with jQuery? I’ll try to explain... I have 2 screens, card registration and card display. For each registered card, I send it to the server and enter it in the internal…
-
2
votes2
answers203
viewsButton that scrolls the page up without reaching the top
I have a code that scrolls the page to the top, but I don’t want it to reach scrollTop = 0. It’s possible that by clicking the button, it just slightly climbs the page up, as if I had keyboard the…
-
2
votes2
answers3463
viewsHow to check if a checkbox is checked with jquery?
Hello, I’m trying to do a JS operation if a checkbox is checked, but I’m not succeeding. Follow the code: $('#btn-proximo').click(function(e){ if($('#in_acesso').is('checked')){ $('#div_valida…
-
2
votes1
answer279
viewsHow to change the color of a div via javascript with one condition
I’m trying to change the color of a div if the following condition is true, if( @ViewBag == "reservado" ), but I’m not succeeding, could someone tell me how the code would look with this condition…
-
2
votes1
answer47
viewsLoad data without refersh
I have a form passing the data by GET to an API, the method put empty to load on the same page, when they return the data I put inside a div to display them, but I need you to do this without…
-
2
votes1
answer142
viewsSynchronize 3 Select with Loading + Jquery/ Ajax
Hello, good day. I am with my app here on the following question. have the page index.html, on this page I have a <div> so that the loading according to the code below: <div id="loader"…
-
2
votes0
answers35
viewsControl order of image load events
I need to upload some images by input file. So far so good. However, I need these images uploaded in order. But when I put img.onload = Function() {} inside the for, the order of the variable i, is…
-
2
votes2
answers634
viewsHover the mouse over the image and change the color of the caption
Good morning dear friends, I wanted to know how to move the mouse over an image, and the background of the legend change color, in the example below I can only change the color when I pass…
-
2
votes2
answers675
viewsMaintain jquery javascript tab when refreshing the page
Good morning, I have the following doubt, I have a system of tabs in javascript but whenever I select a tab and update the page it automatically goes back to the first one which is bad because I…
-
2
votes2
answers58
viewsExchange array data between’S' and 'N'
I have a function that I will adapt to a button, which will exchange a data within an array, between S and N. The code I have is: var array =…
-
2
votes1
answer138
viewsPrint json data list
I need to take the data of a json file and with this data generate a list corresponding to the category it belongs to for example if it is of the technology category need to generate a list of all…
-
2
votes3
answers6987
viewsFormat DD-MM-YYYY string jquery date
I have a field 'DATE' that receives information from DB in the format below: I would like to insert the following pattern: DD-MM-YYYY. Below is the javascript that inserts the data into the field:…
-
2
votes2
answers50
viewsPass values from checkboxes to an element contained in a div
The example below works as follows: When providing all the data (name, phone, status and mark at least one checbox, a button is loaded inside the <div id="btnSubmit"></div>. I can…
-
2
votes1
answer320
viewsjQuery / javascript - Skip input when maxlength is reached
Good morning friends! Next, I want to make a function that if it reaches the maxlength of the input (in case 2 characters), it jumps to the next input. I made the code below that is not running...…
-
2
votes2
answers51
viewsjQuery "contains word" selector does not work as expected
I’m trying to use the "contains word selector" from jQuery to hide/show some elements dynamically on my page, however the selector is not working as expected. I am using the version 3.1.1 jQuery.…
jqueryasked 6 years ago Israel Merljak 943