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
-
4
votes3
answers6672
viewsValidate file extension
I have a code that checks the size before sending the file, I would like to know how to check the file extension together, for example, I need these extensions .jpg, png, .gif, .pdf, .txt, .doc,…
-
4
votes1
answer1426
viewsFind out which image size was inserted by input file
I am creating a system to organize the images of a site, that is, I will store information such as name, extension, size, height, width, ... and I am having difficulties to get the data of height…
-
4
votes3
answers539
viewsIncrement input values in +1 containing letters and numbers using Jquery?
I have a table with data of the cheque sheets as: bank, account, agency and sheet number, everything was fine so far, but today a customer came with a ticket of the Italian and in it has 3 letters…
-
4
votes3
answers229
viewsFunction within Jquery what is the execution order?
I have a function in jquery that has a while that writes data to the database, and after this while it prints on console that the data was saved, the function is like this: function gravaDados(){…
-
4
votes1
answer1227
viewsHow to filter by state cities in Laravel?
I made a filter in the Laravel and it works perfectly but nevertheless brings all the cities. It does not bring the specific cities of that state. I do not know if it is this filter that has to pass…
-
4
votes4
answers1933
viewsHow to choose a convention for variable and function names?
I am going through the second development company and in both have no own convention to use in the declarations, in the codes caught functions declared as follows: PHP and jQuery function…
-
4
votes1
answer408
viewsHow to prevent the child element from activating the parent element event?
The event click configured for the element optgroup is also activated when a option is clicked. How this behavior can be avoided? $("optgroup").on("click", function() { console.log($(this));…
-
4
votes2
answers256
viewsFunction javascript duplicating trigger by init method
I have a function in my main menu that, when clicked, starts a 'classe' for the sector in question, everything goes well, however, I need to start the same class again when someone goes back to the…
-
4
votes3
answers106
viewsProblems closing menu by clicking links
Guys I made a website onepage is in this link, it has a fixed menu on the side that opens when it is clicked but is the following in these links there are anchors that when they are clicked the site…
-
4
votes3
answers1776
viewsDeselect radio type input
I have two inputs of the kind radio. Follow the code below: <input type="radio" id="isgift0" name="isgift" value="0" class="arredondado" /> <label for="isgift0">Teste 1</label>…
-
4
votes2
answers407
viewsWhen I put input inside some div javascript does not work
I want to apply the css in a form but when I put the inputs inside some div javascript does not work See the code: In case when I type the email and the password was for the button to turn blue…
-
4
votes2
answers60
viewsDiv doesn’t stick to the top?
I have a div that I would like you to hold to the top when the div has to touch the top. I tried to do this, resulted but the div continuous blinking. What’s wrong? SCRIPT $(window).on('scroll',…
jqueryasked 7 years ago I_like_trains 1,430 -
4
votes3
answers512
viewsJquery monitoring key sequences
I’m making a form, where data is entered by scanning barcodes (default code 128). After scanning each value, the handheld scanner is already set to give a <TAB> and go to the next field,…
-
4
votes2
answers1155
viewsclose div by clicking outside it
I have a div with a botão inside to close it. At first, she’s with display: none, but to the click on on one button on another div, she turns into display: block. I need to find a way to when she is…
jqueryasked 7 years ago Carlos Rocha 1 -
4
votes2
answers52
viewsKeep the initial class of the element
I have a script that does the toggle in the icon, interspersed when the element is clicked, my intention is when the second or the others icons were clicked, the elements remained with the class…
-
4
votes2
answers1156
viewsslideToggle(); open and close by clicking on the same link, if you click on another just change content of the div
I need to create an effect similar to that site here when you click on the product opens a div with the Infos of it then click on it again that div closes, but if I click on another product and the…
-
4
votes2
answers435
viewsUPDATE PHP com Javascript
I am trying to carry out the UPDATE, but gives the following error: Notice: Undefined index: id in C: wamp www Sitephp base updateFunctioning.php on line 4. Follow my code Function function…
-
4
votes2
answers775
viewsEnable select option with javascript/jquery
I am developing a software, but I can not enable a select. The intention is when check the select enable automatically. How do I do it? function habilitarSofa() { var radios =…
-
4
votes2
answers150
viewsReal-time account for table generated with jQuery
I’m having trouble leaving the quantity * price multiplication in a dynamically created table. Better than explaining, it’s showing. Follow the code in jsfiddle: https://jsfiddle.net/koew1s75/ HTML…
-
4
votes2
answers504
views -
4
votes4
answers7563
viewsHow to include and manipulate local JSON file?
I use JSON data to create the <options> of a <select>: jsonOptions.forEach(function(item) { var option = document.createElement('option'); option.text = item.description; option.value =…
-
4
votes3
answers11182
viewsAppend javascript
I have a modal that opens when I click on a link, in this modal I will type an email that when I click on add email, will add the email text in a <ul> <li> below the input. I already…
-
4
votes2
answers6239
viewsProblem turning input text into uppercase letters
I have a input and I want it to allow real-time capital letters only. This code apparently works perfectly. $("#texto").on("input", function(){ $(this).val($(this).val().toUpperCase()); }); But I…
-
4
votes1
answer112
viewsjQuery cutting words with space
I have a screen where the lines are loaded according to the data of the database and for this I have a PHP+jQuery and related to the creation of the same. What happens is that the array that sends…
-
4
votes3
answers121
viewsList value of checkbox items
How do I make list the checkbox values when the user select and when you are unselected the value does not appear in the list? <select class="form-control" id="list-lugar"> <option…
-
4
votes1
answer292
viewsHow to check if data already exists in the bank before inserting another in angular?
I have already made a modal that receives a name, it sends the controller in the function of inserting new contact. I want to check if this data is already registered in the bank so that it does not…
-
4
votes1
answer3776
viewsHow to create MASK with pure JS in React
I am transforming a site HTML, CSS and jQuery in React but I saw that the use of jQuery is lagged in React since it is possible to create some components faster and simpler, my doubt is how to…
-
4
votes1
answer137
viewsWorking Dynamic Selectors (Or Multiple Selectors) in Jquery
I have a Javascript code (Jquery) that takes characters from a DIV and plays this result for another DIV. For the DIV where I take the characters I created a function that adds a class dynamically,…
-
4
votes2
answers242
viewsHow to leave checked option when clicking div
There is a website where the customer should choose a cor and tamanho for certain product, what I have today are Divs that show colors and sizes but I’m not able to leave the option marcada when…
-
4
votes2
answers673
viewsHow to identify if the user is at the top of the page?
When entering the site the page will be displayed from the top (by default), how to do to identify if the page is at the top using Javascript pure and jQuery? Examples: If the page is at the top,…
-
4
votes1
answer261
viewsAuto Input Fill in another browser tab via script
Is there any script that sends my input value to the page input I open ? As the example below shows, I need to send the value "12345" to the input of the XYZ page as soon as I click the link to open…
-
4
votes2
answers139
viewsPrint Checkbox with Jquery
Good morning I created a shopping list with checkbox and would like to print only the selected checklists. follow the codes below: html code <div class="cont-list carnes"> <h3…
-
4
votes1
answer107
viewsHow to paint multiple page elements by clicking and dragging the mouse?
Essentially my program creates a "screen" of "pixels" where the Divs are the pixels. It randomly generates the colors in the image and the user can use a palette that is below to change, as if to…
-
4
votes2
answers208
viewsDo not allow repeating values in different dropdownlists using jQuery?
I have 3 DropDownList where they have 4 items with the same valor (1,2,3,4). I need to respect each DropDownList do not repeat the value selected in the others. Example: ddl0= 1 ddl1= 2 (não…
-
4
votes1
answer290
viewsHow to get a PHP file past $.ajax?
I’m having a problem I don’t know if it’s sending in $.ajax or picking up with PHP. Is not coming the $_FILES normal on the other side, arrives as 'caminhofoto' => string 'C:\fakepath\1.jpg'…
-
4
votes1
answer260
viewsValidate fields in a form made with jQuery-Steps
The form has two Steps, I was able to validate the first step using the onStepChanging. But in the second step where there are fields that need to be validated, the user action becomes Submit, which…
-
4
votes1
answer46
viewsError mounting HTML table with jQuery
I need to create this screen: The problem is that the code I made generates 9 columns in a row instead of generating 3 columns per row: That is the code: @{ ViewBag.Title = "Home Page"; } <div…
-
4
votes2
answers289
viewsEmail and password validation using Keyup
I am using the code that tells me if both emails are identical, if both passwords are identical and if they are at least 8 and at most 10 characters long. And only if the emails were equal,…
-
4
votes1
answer4069
viewsWhat are jQuery’s AJAX beforeSend arguments for?
I usually see the use of the function of beforeSend: of jQuery.ajax() being used in a simple way, such as emptying a div before the request: function enviar(){ $.ajax({ beforeSend: function(){…
-
4
votes1
answer51
viewsHow to fade more than one element in the result of an Ajax
I am making a file for loading new news, however, new news appears quickly without a smooth entry. I know you can use something like this:…
-
4
votes3
answers850
viewsTaking value from an input
I have two inputs, and each input has a span. Follow the code below. $('.textInput').on('keyup', function(){ console.log($(this).val()); $(".val").attr("date", $('.textInput').val()); }); <script…
-
4
votes2
answers430
viewsAlert message Response Headers
I’m on a project. NET, in which I create a login page and check the DLL, and in this check, is passed a string of a message that I need to capture with a Typescript to give the alert. This message…
-
4
votes2
answers638
viewsCapture input value dynamically with Jquery
I’m having a problem where I need to multiply the value of two input fields (price and quantity) to play in a third field (product price). My problem occurs where I try to get the value of these…
-
4
votes2
answers105
viewsHow do I treat a jQuery array (remove duplicates and prevent an item from appearing in 2 arrays)?
I have 2 arrays (like and notlike) and as I give like or notlike, it adds the item in the array, currently it is like this: //DEFINE ARRAYS like = new Array(); notlike = new Array(); //SE CLICA NO…
-
4
votes2
answers54
viewsMark Previous Check (Parent) to Node
What I need is that when selected Item "Ball" which is a child node of check "1031-HUBCAP ...", the Father node is selected as well. Or Do not let select the child node if the parent node is not…
-
4
votes1
answer251
viewsCalling a v-on by Javascript
Good people, I have a form that uses Vue, where every time I write something it makes a request in the backend to save the data with the v-on:change and when I leave the field he does the same thing…
-
4
votes1
answer12477
viewsUpload image with Axios to a Node.JS server
I’m trying to upload an image using the library Axios, but she’s not getting into the back-end. Image input <input type="file" class="custom-file-input" id="file" name="file"> Note: My form…
-
4
votes2
answers131
viewsHow to load Lightbox2 when entering the page
I am trying for some time to resolve a situation I have, I need that when entering the site an advertisement is displayed and for that I am trying to use the plugin Lightbox2 but in the…
-
4
votes1
answer79
viewsChange another selection option when a selection is triggered, using jquery-Chosen
I want to change another selection when a selection is triggered. I am using Jquery Chosen. Example with pure Jquery here At the moment I’ve done: <form method="post" id="form"> <div…
-
4
votes1
answer33
viewsjquery"Animate()" is not working
I want to use "Animate()" to pass feedback to the user after a click, but the animation is not happening. I used css to determine what would be the final state of the animation and there, it worked,…