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
-
5
votes2
answers4468
viewsInput mask with zeros on the left
I have a numerical type input, which should only receive numbers (obvious). However, some browsers let the user type alphanumeric. However, this is not the only problem. I need 0 to be displayed on…
-
5
votes2
answers973
viewsHow to make this slideshow infinite?
It’s a passing carousel, but the only way I could do it was like this: when it comes to the last slide, it goes back to the first one, making a kind of "return transition" to the beginning.…
-
5
votes2
answers54
viewsRunning a script through the name attribute does not work
Follows the code: <select class="form-control" name="dd_medidaAplicada" id="dd_medidaAplicada"> <option value="0"></option> <option value="cancelada">Advertência…
-
5
votes1
answer3741
viewsHow do I convert formdata to json?
I have the following code: var form = new FormData(); form.append('user',$("#user").val()); form.append('password',$("#password").val()); var data = JSON.stringify($(form).serialize()); but var…
-
5
votes1
answer438
viewsHow to lock cursor drive in Masked input?
I’m using the plugin jQuery Masked Input. <input name="dueDate" class="form-control input-mask-date" type="text" placeholder="Data de Vencimento" data-parsley-trigger="keyup" required=""> And…
-
5
votes2
answers145
viewsLong click with Javascript
In Android there is the method OnLongClickListener in which it is possible to hold down the finger in a View and an action is fired (if the developer sets an action) if that click remains a little…
-
5
votes4
answers5086
viewsHow to add values of a column in the table?
I have the following table below: <table class="table table-bordered table-hover" id="customFields"> <thead> <tr> </tr> <tr> <th width="20%">ID</th> <th…
-
5
votes2
answers887
viewsHow to insert text at cursor position?
How can I insert text at the position of a cursor? the field is a contenteditable so it can contain in addition to normal html css text and images. I took the example in the plugin documentation:…
-
5
votes2
answers487
viewsString Sweep in Search of Substrings Ignoring Accent and Case and For Each Match Perform an Action
I need to search in a string a specific substring and for each occurrence found, I must execute an action to replace what was written by the version in bold, as it appears in the list, ignoring…
-
5
votes3
answers130
viewsHow do I call the next field of a table with Javascript or Jquery?
I tried to create an empty table so that when the user clicks in the middle of the field <td> appears a <input type="text" /> to type. Follows the code: $(function () {…
-
5
votes1
answer322
viewsError rendering with jQuery Ajax
Quick information on how this code should work: Ajax takes an html, compiles with Handlebars, the same ajax takes a json from an api, packages everything and renders an index with an append. var…
-
5
votes1
answer574
viewsLoading animation
I have a code that makes a loading animation before starting a page. css. .preload{ position: fixed; z-index:99999; top:0; left:0; width:100%; height:100%; opacity:1; background-color:#fff;…
-
5
votes1
answer873
viewsHow to display dates set in datepicker only
I’m wearing a lib calling for Multidatespicker similar to the DatePicker of JqueryUI. Currently in the panel I can select the dates I want, works normally, but the same calendar is displayed for the…
-
5
votes1
answer486
viewsApplying datepicker to a dynamic input with Jquery
I have a form where you can add several fields with datepicker. However, when adding a new field to the form, the Jquery datepicker is not loaded. This is the JS responsible for cloning and adding…
-
5
votes2
answers1079
viewsHow to do a random query in Mysql without repeating data?
I’m creating a site type images type Pinterest that, in addition to other things, need to combine the following features: Infinite Scrool (I’m applying this code here:…
-
5
votes3
answers354
viewson('change') shoot every click
How do I so that every time I choose an option it fires an event. In the example below it is already with the selected One. I wanted even if I choose him again he shoots without having to trade…
jqueryasked 6 years, 1 month ago Matheus Soares 53 -
5
votes1
answer695
viewsProblems with modal/boostrap
Hello, I have a problem on my site, I would like when I click on the modal button, it closes and opens the modal again(the following code is a summary code of what I need), in this code, when I open…
-
5
votes4
answers110
viewsMaintain select element value when cloning with jQuery and deleting Labels
Test scenario function addReg(){ var reg = $('#registro').clone().removeAttr('id'); reg.children('label').remove(); $('#formX').append(reg); } <link…
-
5
votes2
answers1140
viewsHow do you input one input into the other?
Hello I’m new here and I’m having a big doubt... I have this code: <!DOCTYPE html> <html> <head> <title></title> </head> <body> <h2>Este campo é…
-
5
votes3
answers254
viewsSearch id of relative element of relative
Goal Fetch the id the "father’s father" of an element. Test scenario function filhoPai(filho){ var filhoId = '#' + filho; var pai = $(filhoId).parent().attr('id'); alert(filho + ' - ' + pai) }…
-
5
votes2
answers70
viewsHow to check the absence of a pointing device on the page on desktops?
In a project that aims to work only on desktop devices (desktop PC or notebook) it is mandatory to use a mouse (or pointing device, which can be a touchpad). If the user accesses from a mobile…
-
5
votes1
answer69
viewsRelation between selects
I have a system that has 3 selects, where selecting an option in the 1st select is listed a list in the 2nd select and selecting an option in the 2nd select, is listed the items in the 3rd. The…
-
5
votes2
answers56
viewsScripts - Load all or split?
I have a page with several static elements, these which, load dynamic elements, basically all in body distributed in divs, via Ajax. These dynamic elements use several functions, relative to each of…
-
5
votes2
answers211
viewsSelect next elements
I have a table with inputs <tr> <th>Linha X</th> <td><input type="number" name="AAA"></td> <td><input type="number" name="BBB"…
-
5
votes2
answers441
viewsShow and hide button with jQuery
I have the following buttons: Below the button INCLUDE, has a button ETCH, that is set as HIDE():, when I click the button INCLUDE, I want the include button to be set as HIDE();, and the button…
jqueryasked 5 years, 4 months ago Rafael Passos 527 -
5
votes1
answer194
viewsHow could I undo a paragraph marking
Normal text image: Image of the selected text: Obs: I intend to format the selection better, but in case what I need is to reverse the process through the cancel method: When there is no paragraph…
-
5
votes2
answers401
viewsHow to disable emoji rendering inside an HTML tag
I have a platform (Website ) where any individual can create content (images and text), however would like to control the rendering of HTML symbols in particular the Emoji within a specific tag (in…
-
5
votes1
answer129
viewsHow to find a specific id within a list?
I’ll try to summarize. I have a list in which I have elements with various ids. I would like to select a specific element within that list. Only that the ID value that will be searched for will be…
-
5
votes1
answer174
viewsShow DIV content by clicking on the image with slideToggle
I’m trying to get a click on an image in question to hide the previous title and show the current one, and so on. I’ve tried using nextAll, return false etc, but I think the problem is nesting…
-
4
votes1
answer164
viewsHow to add a class to multiple cached elements at once?
In jQuery, we can add CSS classes to multiple elements, but with the element already cached in a variable, as we can perform the same operation? Example: // adicionar classe a ambos os elementos…
-
4
votes4
answers1488
viewsHow to close a dropdown if the user clicks another page location?
What is the best method to hide a div, that is fulfilling the role of dropdown, when the user clicks on another page location? At first, I value solutions cross-browser and without the use of…
-
4
votes1
answer1798
viewsHow to make paging in Codeigniter using AJAX?
I’m having trouble finding a way to paginate using AJAX. I’m used to doing it the traditional way and directly with the server using Codeigniter as framework application. However, this time I need…
-
4
votes1
answer429
viewsAdd "thead" to a table created with createelement
I have the following code, which creates a table, using createElement(): var context = document.createElement('table'); var row; context.className = 'table'; row = context.insertRow();…
-
4
votes2
answers2405
viewsPaging inside modal window in bootstrap
I have a modal window in bootstrap, and inside it a pagination, it happens that every time I click on some pagination link, the modal closes. Does anyone know how I keep the modal open? jQuery:…
-
4
votes3
answers955
viewsHow to effectively remove the metatag refresh from a page?
Lately I have accessed several news sites that use this metatag to update their pages from time to time: <meta http-equiv="refresh" content="300"> I understand why you use it on the websites,…
-
4
votes2
answers564
viewsjqGrid does not call the blockUI method without using window.setTimeOut when ajax request fails
I’m using jqGrid 4.54 in my project and I want to put a message blocking the whole screen with the plugin blockUI when my AJAX request encounters some server error like 500 error. I know that the…
-
4
votes2
answers299
viewsDebug associated events via jQuery
When I want to debug an event associated with an element via jQuery, I can currently do it in the following ways: in Chrome, you can enable the debugger specifically for certain types of events.…
-
4
votes2
answers7390
viewsHow to save JSON file with Node.js
I want to make a website to test some things. The site is running on my home server done with Wamp. I was told that I could make a small database using JSON files. I have a JSON file in the website…
-
4
votes3
answers610
viewsReload after update
I am making a status change in my database using $.getJSON, is working, but in return I need to update the div where the data is and I am not able to perform this task, see the code below:…
-
4
votes2
answers546
viewsHow to Fade Only Item Clicked
Here’s what I’m trying to do: I got a looping coming from the database. When I click on a button of one of the results, I wanted to make a fadein div appear. Turns out when I click on one, the div…
-
4
votes1
answer252
viewsHow to use fadein() with an append()?
How to add fadein() effect, along with an append(). EXAMPLE
-
4
votes4
answers1175
viewsFunction to expand list
I created a "dictionary" from A to Z , where when I want to see what is in the letter A, I click on it. Tté ai beauty. So that I don’t have to click one by one to find some meaning, I would like to…
-
4
votes1
answer460
viewsProblem with Jquery effect . Blur() in IE8
I have a method of building dynamic elements using jQuery v1.2 with Ajax, which creates a list of items containing the structure of <ul> and <li>, however, when I apply .blur() and Ajax…
-
4
votes0
answers931
viewsHow to make multiple image uploads with Rails 3?
I ran a scaffold with the name "Property", I need to add images next to it preferably in a different model referencing (1 Property can have many images), where the user can select more than one…
-
4
votes2
answers94
viewsJavascript error function. $. toJSON
I’m running a script that was passed to me by a third party. And this is making the following mistake: Typeerror: $.toJSON is not a Function QtdeQuartos: $.toJSON(qtdQuartos),…
-
4
votes3
answers4074
viewsShow/Hide animated information by clicking on the widget
I would like to perform a simple animation that is executed in the click event assigned to an element. This is the site that I will use this animation. Suppose my element is a circle, for example. I…
-
4
votes3
answers236
viewsCheck if a div contains a number
I have a paragraph that contains several links, alternating between words or numbers. I need to perform the following check: if the link within the paragraph is any text, it will do nothing with the…
-
4
votes2
answers758
viewsAngularjs + Sharepoint + Rest API
People I am currently trying to develop a script within Sharepoint using the Script Editor but it is falling into the error of my code, as if the connection was not correct, however, in google’s…
-
4
votes2
answers447
viewsjQuery who changes div background specifies
I need a help with the following problem, I have the following HTML, which is part of an acordion <div id="accordion2"> <h3 class="btn-sub-main"><a>Banho</a><div…
-
4
votes1
answer277
viewsCSS incompatibility with jquery blockUI in IE 8
I’m using jquery 1.11.0 along with the plugin jquery-blockui 2.66.0 and when locking the screen, the div white background on IE 8 and earlier. Follow the images: The call to blockUI: $.blockUI({…
jquery css internet-explorer internet-explorer-8 jquery-blockuiasked 10 years, 9 months ago Guilherme Vianna 491