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
votes3
answers518
viewsRemove JQUERY tags
I need to remove HTML tags from a variable, or else not interpret the HTML of that variable. The problem is that the variable has its value coming from an input, so: var msg = $('input').val();…
-
2
votes1
answer47
viewsShow hide content when clicked on a specific id
Let’s assume I have two links <a href="#pessoa1">link1</a> <a href="#pessoa2">link2</a> The content shown will only refer to the link clicked and when you click on another…
-
2
votes0
answers134
viewsPhantomjs Wait for ajax Request
I am here with a huge difficulty in Phantomjs; We go there since yesterday I am trying to automate the process of Natran within a system. How will it work? I already have the user’s CPF and RENAVAN,…
-
2
votes1
answer4497
viewsfill input with select value in jquery
I am trying to fill a value dynamically with jquery: In case I want to put the value of the plan when selecting with jquery. Ex.: <div class="input-group input-group-lg"> <span…
-
2
votes1
answer1113
viewsDOM manipulation with Vuejs and Jquery
I am using the pure materialize together with pure Vue to make my own admin template, that is, I managed the project by Vue init and put in index.html the links to the css and js of materialize. The…
-
2
votes2
answers1182
viewsUpload Json to Google Maps
I am drawing a Poligono on the google map, I managed, but as it is big it got a very repetitive code that I would like to isolate in one . json but could not. I tried to do something simple with…
-
2
votes2
answers79
viewsExport jQuery Datatables
I have a tabla and I use Datatables, I am using the native export functionality and give an Hide in the columns my code this more or less like this: "buttons": [ 'copy', 'csv', 'excel', 'pdf',…
-
2
votes2
answers674
viewsValidating input file with ajax request
Whenever I give a Submit in the form appears an error in the line in which this variable $file, I disabled the ajax and did not appear the error, so I guess it is not php problem…
-
2
votes1
answer66
viewsHide/show menu when clicking
I’m having a doubt I’m using Wordpress this is my jquery to pick up the link I am clicking and through an anchor ID # it scrolls down to the desired content but need to hide everything and when…
jqueryasked 6 years, 4 months ago Filipe Nickel Sala 95 -
2
votes2
answers91
viewsJoin in array creating elements?
We can imagine the following array: var arr = ["a", "b", "c", "d"]; I know I can use the join(", ") to turn it into a type string: "a, b, c, d", but I would like to create an element for each item…
-
2
votes3
answers9570
viewsUpdate DIV without refreshing the JQUERY page
Good afternoon Guys, I have an ajax that sends a post some information, in PHP I saved this information in Ssion, I would like to update the DIV where I have a foreach (PHP) to update so that I am…
-
2
votes1
answer42
viewsInfinite text with jQuery
Would it be possible to define using jquery 3.3.1 a default character that cannot be removed from an input? ex: An input has a @, and only 20 letters and/or numbers may be added after this @, but…
-
2
votes3
answers883
viewsAllow Select PDF only in JS
I wonder how to do that when choosing the file to upload it filter by extension . html native pdf or by JS, Jquery. Using type="file" it brings all the files. <!DOCTYPE html> <html>…
-
2
votes1
answer312
viewsDoubt when returning string json to Fullcalendar event
I have a question. I’m using Fullcalendar on a project. I can display the data registered in the database normally. My problem is in the eventClick: did so: var date = new Date(); var d =…
-
2
votes2
answers2246
viewsDelete record from Modal Bootstrap window
I’m trying to delete a record from the Bootstrap modal window, but it’s not working. Look how I did: By clicking the delete button of a particular record <a class="btn btn-primary delete"…
-
2
votes1
answer2945
viewsHow to take the value of a select and fill in an input?
<?php $con=mysql_connect("localhost","root","") or die("Failed to connect with database!!!!"); mysql_select_db("bancoteste", $con); $sth = mysql_query("SELECT * FROM pessoa"); ?> <!DOCTYPE…
-
2
votes1
answer193
viewsConsult real-time database inserts
There is a table in Mysql that suffers many insertions. The application needs to show these changes to the customer. Currently the existing application query, every 10 seconds, the table and shows…
-
2
votes0
answers34
viewsDoubt - Javascript
I need to take the value of the text box and put it into a global variable. How do I do this?
-
2
votes1
answer1073
viewsExport Datatables
I use the plugin Jquery Datatables, and would like to export the data (CSV, Excel, PDF...) of the tables through custom buttons, instead of the buttons that the plugin itself offers, will it be…
-
2
votes1
answer61
viewsInappbrowser using Phonegap build
I have an application that runs on mobile compiled in PG build Cli 5.2.0 In this app I have some external links to open. I implemented inappbrowser to be able to close the open browser and return to…
jqueryasked 8 years, 4 months ago Valmir Sartori 21 -
2
votes1
answer3982
viewsHow to check the modal closure
Via Ajax I register items in the database and return a certain value to the user through a modal using the innerHTML. Done that the "html" of modal is filled with the amounts I pulled from the bank.…
-
2
votes1
answer5856
viewsmaskMoney without having to select input
Guys I’m using maskMoney but it only format value if I click the input, have you change it? That is to format it as soon as the page is loaded? $(function() { $("input").maskMoney({ allowNegative:…
-
2
votes1
answer102
viewsUsing Promises and Deffered in everyday life
I’m studying about these items and I’m having doubts about how to apply them to my projects. I currently use callback for everything but the structure of the code is tense.. and on the Internet I…
-
2
votes2
answers2482
viewsHow to send form data with onChange event to php
Good morning guys, can anyone help me with the following problem, i want to send data of two fields, one of type text and the other of type select option and I want when I click on select to do…
-
2
votes3
answers404
viewsAjax Requests - Tips
The thing is, I’d like a suggestion and tip to make a correct system. For example, today I use jquery and many requests $.ajax, this is to popular some data, to send form data and etc. But I…
-
2
votes1
answer60
viewsJquey-ui depends on Jquery
Does jquery-ui depend on jquery in an application ? , I ask because in the application I am working apparently jquery.min is not being used, and the doubt and if it has to be there to support…
-
2
votes3
answers37
viewsImproving jquery code
I have a code in jquery that does the following, it creates a class after Hover, until then it is working normally, but as I will have to replicate this action elsewhere but will change the css…
-
2
votes3
answers873
viewsKey modal Event
Can you call a Vue bootstrap modal using a keyevent in VUEJS?? I don’t want any kind of button on the screen or inputs, I want to know if I can call the modal just by pressing a specific key. Such…
-
2
votes2
answers6499
viewsHow to make it impossible to select other checkboxes when selecting a checkbox?
I have these 3 checkbox <td style="background-color: #D6FAFA"><input type="checkbox" name="box2" id="ok" /></td> <td style="background-color: #D6FAFA"><input…
-
2
votes1
answer82
viewsValidate text box so it has 9 numbers and can only start with 9 or 2
Good afternoon, It needed to create a validation of a text box in which it is mandatory to be only numbers and which must start with 9 or 2 and must also have 9 numbers. Someone gives me a light on…
-
2
votes1
answer1435
viewsInserting holidays in jquery datepicker?
I have a method that alters the datepicker of jquery and inserts some special days (in the case of holidays of the state of RJ), when selecting a holiday, an Alert with the day is launched, however,…
-
2
votes2
answers67
viewsCan you declare a variable in Javascript so that it always has 2 decimal places?
The idea is not to have to convert the result to two decimal places every time. Example: var preco = 10.00 To show these decimal places, I have to put like this: $("#preco").html("R$ " +…
-
2
votes4
answers1978
viewsMask in Rails fields
Guys I’m getting beat up for something theoretically simple, I’m wanting to put a date mask on my application.js: //= require maskedinput jQuery(function($){ $("#datadoacao").mask("99/99/9999");…
-
2
votes2
answers68
viewsApply effect only on target element
I have this html of registered cards: .lista-cartoneira h1 { font-size: 1.2rem; margin: 12px 0 12px 0; font-weight: 500; } .lista-cartoneira h2 { font-size: 1rem; margin: 12px 0 12px 0; }…
-
2
votes2
answers383
viewsSubtraction of arrays
I have two arrays: A AND B A = [1,2,3...] B = [7,5,1...] When I do this subtraction has the correct subtraction return: console.log(A[0] - B[0]); But when I play in the loop it doesn’t work: while…
-
2
votes1
answer43
viewsHow to make array2 have the same ratio between indexes after array1 shuffle
array1 = [1,2,3]; array2 = ["one","two","three"]; array1 and array2 have a direct relationship between the indices. Shuffled array1 -> array1 = [3,1,2]; How to make array2 have the same relation…
-
2
votes2
answers28
viewsSeleção Elementos
I have the following structure below HTML,. <tr> <td class="descricao">Texto01</td> <td class="btn-l"><button type="button">Leitura Confirmada</button></td>…
-
2
votes1
answer69
viewsHow to use Jquery.Mask for input CPF using []
I am trying to use Jquery.Mask to insert a mask to a field with CPF but it does not work when the field has the following format: $("#Cpfpessoa[]") The input is like this: <input type="text"…
-
2
votes1
answer60
viewsAdjust the middle slide according to the proposed layout
I’m trying to adjust the slides according to the proposed layout, but I’m having difficulties. I’m using the Owl Carousel plugin, I searched some plugin ready on the internet that contains this…
-
2
votes1
answer1283
viewsHow to put mascara in the form input field that is in a modal bootstrap window
Guys, I’m using jquery Mask at head <script type="text/javascript"> $( document ).ready(function() { $("#celular1").mask("(00) 00000-0000"); }); }); </script> I am connected with jquery…
-
2
votes1
answer31
viewsATTR passing _Blank
The code below redirects to another page, but I would like it to be in another browser tab, so I used _Blank. but it does not go to another tab. Could someone tell me where I’m going wrong? Thank…
jqueryasked 5 years, 11 months ago Joao Torres 139 -
2
votes1
answer150
viewsJquery/Ajax - How to keep the page up to date?
I have a page that is loaded with $.ajax() from Jquery, ajax pulls a page in php with a database that is constantly updated and need to keep the page updated, as serious the best way ? I read about…
-
2
votes2
answers194
viewsvalidation in IF Jquery
good afternoon, I have several screens that is hidden(fade), when clicked on a button it appears. <script> $(document).ready(function() { $("#animate").click(function() {…
jqueryasked 5 years, 10 months ago Roney Berti 71 -
2
votes1
answer1218
viewsCreate share button on Linkedin
I am developing a Web project and in this project contains the button to share on Linkedin (customized). I’ve worked with sharing Facebook and Twitter and so far is working normal, but I’ve never…
-
2
votes1
answer1620
viewsHow to filter html text and display div according to the found text
Save list! I need a little help here I have the following tags in html: <html> <body> <div id="div01" style="display: none"> <p> esse texto está aqui para ser…
-
2
votes1
answer69
viewsEnable Jquery function when x characters
Very good day! I have a form with only one input: <input type="number" name="codigo" class="form-control" style="margin-left: 2%" autofocus id='codigo'> And I need that when the input reaches…
-
2
votes1
answer91
viewsMask Jquery error when typing a letter
I am with the following problem I am using for example the Mask code $(document).ready(function(){ $('.cpf').mask('999.999.999-99'); }); perfect it works and accepts only numbers, but if I fix any…
-
2
votes1
answer1704
viewsHow to select a <option> of <select> with javascript/jquery
I have two selects, one for the employee and one for the function, where it is necessary that when an employee is selected the function of the employee is already automatically selected. That one…
-
2
votes2
answers47
viewsValue of div being sent dynamically to php page
I have a simple game that ultimately generates a score. The score appears this way: <div id='cScore'>0</div></div> I would like at the moment that this div is called that this…
-
2
votes1
answer435
viewsAJAX request after other AJAX requests
I need to make an AJAX request after any other AJAX request. However, using the method $(document).ajaxComplete(), for example, the request would end in an infinite loop. Is there any easier way to…