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
votes2
answers1749
viewsUpdate HTML Table with PHP
I have a page that you can select in php in a Firebird database and return the result in table form. My interest and update prices from a list to quote price, as I do to click on the cell and update…
-
4
votes2
answers111
viewsMobile Swipe: Hangs when moving your finger on the screen quickly
Hello, I’m studying Touch Events and making an example of a page with full sections that passes one by one on the screen. I did the CSS, HTML and Script, the basic works... But when I test on the…
-
4
votes1
answer442
viewseffect on input using jQuery
Guys I’m making a input with an effect similar to that of Android. Good here in this example I put a input and a select. The input is working perfectly, when he is with the Focus he turns blue.…
-
4
votes2
answers499
viewsDiv appears in her after 2 seconds with jQuery
Guys I’m mounting the loading system using Jquery. And they consist of a div that covers the entire tala in the browser and that when all elements of the page are loaded, Jquery hides the div. The…
-
4
votes2
answers82
viewsDifferences between event definitions
Examples 1. <button onclick="clickTeste()">Teste</button> function clickTeste() { alert("click"); } 2. (the most commonly used) $("#testeid").click(function() { alert("click"); }); 3.…
-
4
votes2
answers1012
viewsValidation of Time
Guys I’m doing an hour validation on Javascript. I can’t type the following hours 14:00, 15:00, 16:00 until 20:00, but other hours I can get. I’m doing like this: var mask = "HH:MM", pattern = {…
-
4
votes4
answers6855
viewsExecute function when losing focus of an input
I have a normal html input: <input type="text" class="form-control" style=" width: 20%" id="hLane1"> </input> To make it run an event just use the event click But what if I need to…
-
4
votes1
answer6033
viewsShow/Hide div using a radio button
Well I need to check the state of mine radio button to make sure that if he is active in "Yes", he opens the <div class="camposExtras">, click on "Not" he closes the div, and this should be…
-
4
votes1
answer121
viewsHow to use '.each()' in a variable to get multiple '.attr()' from a list?
I’m starting to develop a video gallery that I’m going to do upload for Github for anyone who wants to download and use it. I have a list as follows: <ul> <li><span class="everyVideo…
-
4
votes2
answers483
viewsValidation of two fields with jQuery.validate and Dataannotations
Good afternoon, you guys, Next, I need to validate if one of two fields is filled, I tried to create an Attribute function with Validationattribute but not correctly validated, I think…
-
4
votes1
answer59
viewsProblems to add element to HTML with jQuery
Everybody, good morning! All right ?! I’m going through a problem with jQuery and HTML in which I’m trying to add the elements when the mouse click is out of certain field[input]. This procedure…
-
4
votes3
answers2067
viewsconvert integer to decimal in jquery
I need to convert for example the value "025" for "0.25" or "005" for "0.05": I’m trying to do it this way: var valor1 = $("#ValorDesconto").val().replace(/[^\d]+/g,'');…
-
4
votes3
answers696
viewsHow to make a custom filter using the Bootstrap Selectpicker?
Good morning guys. I have a problem using Selectpicker to make a Combobox with the products I bring from BD with PHP. My problem is this: I need to make a "custom" filter because when I put inside…
-
4
votes1
answer6159
viewsjquery.inputmask mask with Real Currency values
I’m using the plugin jquery.inputmask for various types of mask in the imputs of my application and including for format coins. I’m using the following custom rule: <script> $(function() {…
-
4
votes3
answers3050
viewsHow to change the color of the input using jquery Validate?
I am implementing a jquery form, and I want that when Valida runs and class error is added to the label leaving the red font, I will send a picture representing how I want. <html> <head>…
-
4
votes1
answer213
viewsWhy is this call automatically inserted into the HTML body?
In an app I’m using the Javascript libraries: jQuery, Angular, Angular Material and Moment. Totaling I have the following calls in my file: <script src="vendor/jquery/jquery-3.1.1.js"…
-
4
votes2
answers136
viewsRunning bug jQuery
I’m having a really weird little problem, I’ve never run into him before. ... function resizeResponsivo() { var width = window.innerWidth, height = window.innerHeight; if ( width < 651 &&…
-
4
votes1
answer1201
viewsHow to update a Dropdownlist without refreshing the page
I have a State Dropdown, and a City Dropdown, and a zip code field, which is making use of the mail online API, when I put a zip code, my system checks whether the city already exists in the…
-
4
votes1
answer146
viewsHelp with Javascript comparison operators
Good Afternoon, I am doing a job, of which I will have several forms with a minimum and maximum number and I want to create a check function and avoid inserting numbers out of the track by the…
-
4
votes1
answer104
viewsHow to generate a graph with a curve similar to "sine" in jquery Flot?
Friends, I’m using Flot for a little ECG simulation (electrocardiogram), and I stumbled across a problem, which I think is over mathematics than of programming... So I’m sorry if I’m explaining bad.…
-
4
votes2
answers892
viewsGrab Id and move to another function on click button
Galley, I have the following problem, I have a table and every record I have a link. By clicking on this link I take the ID as follows and call a modal. <script> $(document).on("click", "a",…
-
4
votes2
answers734
viewsHow to remove "disabled" attribute from the parent select option?
I need that only in the select option that is selected the "Leader" option, it does not assign the "disabled", only in the other selects daughters. The logic is that only a user can be a leader, but…
-
4
votes4
answers6187
viewsHow to pick up element above Jquery?
I have the following elements: <p class="id-task">5</p> <p class="status-change"> <i id="test-task" class="fa fa-flask fa-lg" aria-hidden="true"></i> </p> I’m…
-
4
votes1
answer1902
viewshow to pass an input value with ajax and receive in php with the post method?
I needed to pass a field value html with the ajax and receive it in a variable in php on another page <script> $(document).ready(function(){ $("#botao").click(function(){ site =…
-
4
votes2
answers59
viewsUnusual way to use a jquery function
This answer to a question brought something I didn’t know: a return with two pairs of square bracketsreturn[][] in a role, solving a problem in a simple but unknown way to me. The question called…
-
4
votes2
answers983
viewsHow to force dowload a pdf?
I have a PHP and HTML application of a registration form, as I do to download a select as an example: By clicking yes, it downloads according to a link that makes this (download) in pdf. Follow the…
-
4
votes3
answers65
viewsGlobal function for plugin
I’m creating a plugin simple with jQuery and Bootstrap, and in my Javascript I have the following excerpt: $.fn.myPlugin = function(options) { var element = this; var settings = $.extend({ param1:…
-
4
votes1
answer1384
viewsHow to change IMG(logo) from menu(header) when scrolling page?
I have this menu that has an image: logo.png, as the code below shows <header class="header"> <div class="container"> <a href="index.html" class="grid-4"> <img…
-
4
votes3
answers20580
viewsClose modal bootstrap automatically when send form
I have a bootstrap modal whose same has a contact form: HTML: Thank you! Your form has been sent successfully and as soon as possible will be answered. <div class="modal fade" id="contactModal"…
-
4
votes2
answers1054
viewsHow to identify changed value in input
How to identify if a determining value has been changed in input? I have the prototype below, however alert will be displayed according to the number of times the class="ultimo-valor" appears in the…
-
4
votes3
answers4343
viewsHow to download file without back-end
I want to force the download of a file and I’m trying these two ways. downloading on the same page: var docLocation = window.location.href + 'docs/apresentacao.pdf'; var iframe = $('<iframe…
-
4
votes3
answers21853
viewsHow to select an option in <select> via text using jQuery?
I have a <select> created in this way: <select id="animal"> <option value="0">Novilha</option> <option value="1">Bezerro</option> <option…
-
4
votes3
answers937
viewsHow to add a div or <p> inside a table
Well I have a table that I’ve assembled with css. I need to add an observation within a few lines, IE will not be in all lines. The problem is that I am not succeeding, I tried to post the doubt…
-
4
votes3
answers2670
viewsTable with horizontal scrollbar
I set up a table with CSS, but I’m having a problem when reports are opened on mobile or tablet. The table gets flattened, or data gets confused. It has how to place a scroll bar horizontally, and…
-
4
votes2
answers924
viewsIs it possible to insert a select into a td when double-clicking?
Hello I have a dynamic table that works very well, but as the field is an input people can type anything, but wanted to limit this edition using the options of the options, the table I use the…
-
4
votes1
answer1091
viewsAJAX request time
Well I make a request via AJAX, so I can put a load on the screen and remove it when AJAX loads the page. The problem is that I need to make the load appear only if the request takes more than 2…
-
4
votes2
answers79
viewsSeparate the string value
Colleagues. When calculating the cart freight, it is returning as follows: I wonder, how do I get only the value 24.90? Because I need to add to the value of the cart. See below the reference codes:…
-
4
votes1
answer777
viewsHow to transform a string into HTML C#
I am using a component and need to load it with HTML snippet that comes in a variable. For this I created this Jquery: $(document).ready(function(){…
-
4
votes1
answer29
viewsHow to use scrollbar bottom when opening modal?
In the code: .modal-body { max-height: calc(100vh - 210px); overflow-y: auto; } <link href="https://netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css" rel="stylesheet"/> <link…
-
4
votes1
answer1936
viewsHow to create a scrolling menu?
As is done this fixed menu at the top of the page that when the user scrolls down the screen when arriving at a particular page location the menu decreases getting compact. And by turning the screen…
-
4
votes2
answers6031
viewsHow does . Closest() work in Jquery?
Hello, I wonder if I’m misinterpreting the command, or if I’m doing something wrong in the implementation. Freely translating, closest means "closer". But by clicking on an element and asking for…
jqueryasked 7 years, 7 months ago Artur Trapp 5,175 -
4
votes2
answers4666
viewsRemove disabled attribute when a condition is met
Good night. I am trying to make a login and registration screen for an application that will save the data in localStorage. To prevent the user from registering with incomplete data I disabled the…
javascript jquery html5 localstorage javascript-eventsasked 7 years, 7 months ago Mauricio Hartmann 131 -
4
votes2
answers7451
views.Empty() in javascript, how to do?
I am using a preview script for images created with jquery, but I want to perform it in Javascript Vanilla, I am looking for a way to replace the variable command All.Empty(); however I could not…
-
4
votes1
answer3070
viewsPass Jquery variable to PHP
I’m with this script that brings user geolocation: (function() { if(!!navigator.geolocation) { var map; var mapOptions = { }; map = new google.maps.Map(document.getElementById('google_canvas'),…
-
4
votes2
answers2414
viewsPure Javascript add class function [can’t be left 2015/2016]
Good morning to all. I made an effect in which I click on a div and swap the image with css animation effect. In this case, I used jquery addClass/toggleClass (I used the 2). But I wanted to make a…
-
4
votes3
answers846
viewsStay in the same tab after Refresh
I am developing a website in jQuery. And so far I have created a simple menu with content to appear within Divs. Menu <ul class="menu" id="menu"> <li…
-
4
votes3
answers899
viewsTaking value from an array
I am trying to get the value of a table field created with Ajax. With the function below, all fields with the name qtde appear, including what I need. I need to make a simple account of a typed…
-
4
votes2
answers35
viewsJquery ignoring houses on the right
I set the function below, for validation of values in two fields, one automatic (comes from the bank) and the other typed by the user. What happens is that, apparently, it ignores the houses to the…
-
4
votes3
answers1847
viewsJquery: calculate the number of banknotes of the cashout value (deliver as few as possible)
I’m solving an exercise that I’m having doubts about, it refers to a bank system, in which when I present the withdrawal value, I should receive the least possible number of notes for the indicated…
-
4
votes4
answers211
viewsLike a tag on a table element with jQuery?
I have a simple table: table { border-collapse: collapse; } table tr td { border: 1px solid #000; } mark { background: yellow; } <table width="300px" border="1px" bordercolor="#FF0000">…