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
-
0
votes1
answer34
viewsFind div that contains image and add class for CSS recognition
I need help finding tags <img> inside the structure below. When found, add a "hasimg" class together with the "skuFiltro" tag class <ul> primary. I need to recognize if you have image or…
-
0
votes0
answers88
viewsHow do I make the infinite scroll not load the same values again?
I have the following code: <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.2.6/jquery.min.js" type="text/javascript"></script> <script> $(document).ready(function() {…
-
0
votes2
answers106
viewsRemove Div in which element is included
I have a form, where I do the clone (jQuery) to add new inputs, where I can also remove them. The problem that occurs is: I need to remove the div "chain" where the remove button is. And currently I…
-
0
votes1
answer14
viewsHow to pass an index to the element according to its position?
I am loading data from an external api with json and jquery,every ajax request a div with the item class, a div with the more_info class and a see button plus, which loads the rest of the data, and…
-
0
votes2
answers101
viewsTake value from a select
I have the following form: I would like to take the value of select as you add more fields. I’m trying to take it this way, but it only returns me the Pax, IE, always the first value, even when I…
jqueryasked 6 years, 4 months ago user24136 -
0
votes1
answer818
viewshtml javascript list json data in <ul> <li>
Staff I ask for a help from friends: the code makes an ajax request to take data from an api (json) and pass through all objects within the array my json= [{Name:"Ajato 2000"}, {Name:"Crystal I"} ]…
-
0
votes3
answers90
viewsGive form Ubmit with empty field validations
I have this code that validates a form if it has several fields but it does the form Submit: $("#btnAdd").click(function (e) { e.preventDefault(); var erros = 0; $("#formAdd input").each(function ()…
-
0
votes1
answer86
viewsFill modal to edit with information coming from the database based on id
I need to fill a Modal in edit mode based on the received id. My code: $("body").on('click', '#editfoto', function () { $('#modalEdit').modal('show'); id = $(this).data("idedit");…
-
0
votes2
answers42
viewsElement Superior to Input
Good morning, I’m putting a mask on a field that formats a phone number, but you can see that the field ID is #Field_11690, as it was created by a Wordpress plugin. ( function( $ ) { // jQuery…
-
0
votes0
answers397
viewsChanging a CSS class by Javascript
I have this class in my CSS: .botao-localizacao{ display: block; } It doesn’t exist in my html, only in CSS. So my question is: how do I change it in my javascript/jquery? EX: .botao-localizacao{…
-
0
votes1
answer37
viewsProblems with jquery to read json
-- Edited-- I’m having trouble solving a problem with my code. I use jquery to make a request for a barcode. I can even find the value but I can’t associate my function to mount the table. The error…
-
0
votes0
answers81
viewsCheck element and replace - JS repeat
var test = new Array(); test["102-1"] = new Array("102-1", "Elemento"); $(document).ready(function () { $("a[name='" + test["102-1"][0] + "']").attr({ "data-original-title":test["102-1"][1] }); });…
-
0
votes1
answer126
viewsHow to pass more than one url to ajax consume json?
I need to create div’s with data from two urls with json via ajax, and the data will be returned on the same page, but I need to pass two urls as parameter, as I can do this? var url_aparecida =…
-
0
votes4
answers1217
viewsMultiple choice question
I have to develop a quiz with javascript, the first part already developed that are to get the answer of questions with only 1 correct answer, but I’m not able to do the second part that are the…
-
0
votes1
answer90
viewsHow do I dynamically change the minimum number of search characters in the jQuery Autocomplete library
I’m trying to dynamically change the attribute minLength library jQuery Autocomplete. This need is due to the fact that if the user performs the search by the name or email of the client the minimum…
-
0
votes0
answers16
viewsJquery POST with PHP does not query
I have never made a Jquery script that queries with PHP via POST. What I’ve managed to do is this: $('a.js-cd-panel-trigger').click(function(e) { e.preventDefault(); var valor = $(this).attr('id');…
jqueryasked 6 years, 4 months ago Rogério Pancini 397 -
0
votes1
answer68
viewsHelp to capture change in checkbox field
I have the following code that searches the product and creates the row in the table the way I want and then stores the data in a Json to be sent by post. It only works when I input a new product.…
-
0
votes1
answer117
viewsUse befereSend in ajax to make a loading screen in Modal
I’m trying to make a loading screen using modal and jquery, where while collecting the database information, it has to appear loading. But even after you have already loaded, the modal is not…
-
0
votes0
answers123
views -
0
votes1
answer119
viewsSlidetoggle - Open and Closed Configuration - jQuery
I will present the idea that I want to do on my website and then I will show you what I have already done and what is working correctly and soon after I will present the problem that I am not able…
-
0
votes2
answers147
viewsChange the style/theme of the site and store it in Localstorage
I have a theme change system on my blog, but it has some problems, like, it can’t change the style of a div.class added by jquery (addClass) or pseudo elements styles (after/before/active etc) and…
-
0
votes1
answer59
viewsAJAX request with FOR
Good staff as I can correctly print Hello World, using AJAX request, inside a for? My real question is: understand why the for executes your entire loop in the first ajax request, and only then run…
-
0
votes0
answers50
viewsProgress bar before function run
I have a certificate issuing page, and it takes some time to create the request and keys, as it is all done in the browser. I want to implement a progress bar so the user doesn’t get the impression…
-
0
votes1
answer86
viewsAJAX/jQuery call running only once
Good morning guys, I am setting up a tree scheme (network) where I send the parameters via GET to my API, and it returns me the data to mount my code is as follows: $('.btn-rede').click(function ()…
-
0
votes0
answers491
viewsError in the email field mask and validation
I am trying to implement a mask and validate the email field using the plugin inputmask unsuccessfully the mask does not appear and consequently does not validate, why ? That is the code:…
-
0
votes2
answers1675
viewsTooltip Bootstrap 4 does not work
I’m trying to use Tooltip with Bootstrap 4, but it just doesn’t show up: In HTML it looks like this: <a class="btn btn-sm btn-warning" href="" data-toggle="tooltip" data-placement="top"…
-
0
votes1
answer105
viewspreventDefault does not work in Browsers for Mobile
In computer browsers I can prevent the default anchor action normally, but using in most mobile browsers does not work. I need that when clicking the link the browser does not direct to the link…
-
0
votes2
answers205
viewsHow to show a div with scrollTop after certain pixels?
I have a div (Fixed) that appears when the page is scrolled down and reappears when the page is scrolled up. I need it to just disappear (when rolling down) from the body’s 45px. That is, while the…
-
0
votes1
answer237
viewsUpdating date and clock
I am creating a clock from an informed value, the problem is that the clock is not being updated. The other problem is that the exhibition is reversed, the month is coming before the day. What am I…
-
0
votes1
answer500
viewsChange the value of the checked attribute of an input type='radio'
I have two radio inputs <input id="tab-1" type="radio" value="juridica" name="tab" class="sign-in"><label for="tab-1"class="tab">Jurídico</label> <input id="tab-2" type="radio"…
-
0
votes1
answer68
viewsRed item on screen prevent Submit - Javascript/Jquery
I have a view with 3 divs and 20 input number in every row of my div and a input submit. Every line comes from my bank. (For this example I will use only 3 inputs number). Those of mine divs are…
-
0
votes1
answer854
viewsCall php function using onblur (completed)
I have an event onblur to call a function and this function has to call a php class in order to compare what was typed in the input with what is in my BD, but I don’t know how to do it using jquery,…
-
0
votes1
answer70
viewsDynamic price calculation
I am developing a sales system web app, in which you can place several products in 1 sale, increasing inputs dynamically. He calculates the price of each product by multiplying it by quantity…
-
0
votes1
answer949
viewsFormat currency in jQuery
I have the following HTML <table id="products_stock" class="table"> <thead > <tr> <th class="active">Produto</th> <th class="active">Categoria</th> <th…
jqueryasked 6 years, 4 months ago Sr. André Baill 6,946 -
0
votes1
answer89
viewsScript conflict in my html file
I am creating a web application where the main page is a Timeline, and this Timeline should update your content automatically. I’m using Jquery’s setTimeOut function to update Timeline every x…
-
0
votes1
answer46
viewsWhen changing a certain status, it changes from all
How can I make the user when clicking on Pending, the status change to Paid? Look at: I’m doing it this way: PHP while($csClientes = mysqli_fetch_object($sqlClientes)){ $visualizar .= "<tr>";…
jqueryasked 6 years, 4 months ago user24136 -
0
votes0
answers46
viewsUpdate Div’s after database status is changed
I have the following listing: When I upgrade from pending to paid status: I would like the values of the upper Paid and Pending Panels to be updated automatically, but only when I update the page:…
jqueryasked 6 years, 4 months ago user24136 -
0
votes0
answers554
viewsRequest being Barred by CORS policy
I’m trying to build my Front End using the Icinga API, but I’m constantly encountering the following error: Access to Xmlhttprequest at…
-
0
votes1
answer282
viewsHow to take individual td values from dynamic table without clicking on the row
I have a button that sends the form, and inside the form have the respective fields, inside the fomulário has a table that brings dinanmicamente the data of the database that is allows editing of…
-
0
votes0
answers340
viewsPuzzle with DIV
In my games in HTML and Javascript, I tried to create a mini puzzle with the block and the fitting place where it will be placed. function parseNumber(num) { return parseFloat(num.replace(/[^\d]/))…
-
0
votes1
answer37
viewsChange information with JS-JQUERY
I am trying to change a certain value within my html code, through JS-JEQUERY, but this not changing, my logic is wrong ? Follows the code: var valor = "texto"; $('.botao botao-comprar principal…
-
0
votes2
answers916
viewsJquery autocomplete with Ajax via PHP and Mysql
I have an input that is populated via Jquery autocomplete. Simple and efficient. But I wanted to make sure that when selecting a number of this input (it is a mobile IMEI number) it already looked…
-
0
votes2
answers105
viewsgetJSON with parsererror
I am trying to realize the deletion and an item for this controller send a code to view 0 or 1, but the JS function responsible for treating that return is always falling into the fail with the…
-
0
votes1
answer67
viewsReturn value of an input
I’m trying to get an input value on sweetalert2 trying to follow this example that is there on the site const {value: password} = await Swal({ title: 'Enter your password', input: 'password',…
-
0
votes1
answer29
viewsData Does Not Pass Before Submit
good afternoon. I’m new to the forum and new to programming and I’m stuck in an action. I am calling a modal window for the user to enter some information and when clicking save the information goes…
-
0
votes1
answer163
viewsHow to store a JWT Token in a simple method and redirect to another page?
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta…
-
0
votes2
answers162
viewsLeaving the Jqery foreach
I’m having trouble getting out of a foreach when the internal if condition is met, I followed the recommendations of the official Jquery documentation that says to give a return false but still not…
-
0
votes0
answers39
viewsSort differently with . each
I have a screen that lists some skills, they come from the bank in the following format. The last two are the pays that are OK and right after it starts the rest, where 0219 is February/2019, 0319…
-
0
votes2
answers259
viewsAJAX request function that returns another function for JSON object manipulation
I have a function that uses AJAX to return data from a database. The data is processed and returned in JSON and, from there, I do the proper manipulations. So: function getData() { $.ajax({ url:…
-
0
votes1
answer431
viewsCounter Click Javascript Jquery
I am applying image attributes and names via Jquery through an array of images and names. The image below illustrates the images of the loaded array. When I click I display the name of the image…