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
-
3
votes2
answers1197
viewsIt is possible to know that an option has been selected in javascript event
I know it’s possible to take the value of a select selected with: $("id option:selected").val() But I was wondering if it’s possible to catch some select is selected via event, for example when…
-
3
votes2
answers1320
viewsLimit characters and display the amount of characters
Good guys I got one input for the user to put the name, and below the input I have both typed characters and the maximum amount (0/50). I wish that every time he typed himself increases the typed…
-
3
votes1
answer243
viewsjQuery + Angularjs + Materialize CSS error
I have the following procedure in my angular controller: $(document).ready(function(){ angular.element('.button-collapse').sideNav(); angular.element('.parallax').parallax(); }); I’m starting these…
-
3
votes2
answers213
viewsDifference between click, bind, live, delegate, Trigger and on functions?
I did a search but there is a comparison list between the functions below: $().click(fn) $().bind('click', fn) $().live('click', fn) $().delegate(selector, 'click', fn) $().trigger('click')…
-
3
votes1
answer192
viewsAJAX request works on all browsers except Firefox
I have tried to make an upload system with AJAX and works perfectly in Chrome, however it does not work in firefox. I used the function $.ajax() jquery. Have any suggestions of what might be? I have…
-
3
votes2
answers97
viewsMechanics Caroussel bootstrap, slide show
I’m trying to 'copy' the mechanics of boostrap Caroussel (http://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_carousel&stacked=h). Forward walks well, it is not the same mechanic of the…
-
3
votes2
answers308
viewsIncrement numbers to ID name
Good afternoon guys, I need a help, I have the following condition, after clicking a button I must insert a new checkbox and the first of these checkbox has an id="0", the following must have…
-
3
votes1
answer868
viewsGoogle maps map turns gray, but when I change the browser zoom back, what should I do?
So guys, I have 2 parts of the system that I work on, where I use a map to show the address of the property or person. Except that in immovable works perfectly, but in the person (q has the same…
-
3
votes4
answers238
viewsVariable feed within variable
In JS I have the following line: var recebeMensagem = ''; var mensagemBot = '<div class="bot_mensagens">'+recebeMensagem+'</div>'; // 1ª mensagem recebeMensagem = 'Olá';…
-
3
votes1
answer173
viewsDetect Smartphone back button
Is there any way to detect when the physical button comes back from smartphone is clicked? I need it to close one modal. I thought there might be a matching number like on the keyboard and use the…
-
3
votes5
answers869
viewsFill <text> inputs after check <checkbox> and clear when unchecking
When checking chekbox all fields must be filled with the anonymous word and when unchecking it clears the fields. My html: <form> Deseja anonimato? <input type="checkbox" id="anonimo">…
-
3
votes2
answers2177
viewsHow to create a JSON file from a JS?
Hello, I created a simple page where the user can define some fields. I need to implement the following function: When you click the 'Create' button, the application should generate a JSON file with…
-
3
votes1
answer66
viewsPosition one element over the other
.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; } .lista-cartoneira img { width: 80px; height:…
-
3
votes2
answers1874
viewsTake custom attribute value "data-attribute" within a loop
I want to select all custom attributes and do a validation with them, but I don’t know how I can get the "attr" value inside a loop, since they are the ones being iterated. HTML example: <input…
-
3
votes1
answer2398
viewsRun PHP without updating the entire page
My code is this: <?php $buscarusuario=$pdo->prepare("SELECT * FROM top5 WHERE status = 'ativo' ORDER BY colocacao ASC"); $buscarusuario->execute(); // Exibir com Fetch_Obj…
-
3
votes1
answer277
viewsDisfigured layout using Bootstrap Wizard
I’m running some tests with a script where the user can only proceed to the next step if the corresponding checkbox is checked, I managed with the help of @Sam to perform this configuration, but now…
-
3
votes2
answers326
viewsStart function and run function again by clicking the button
When the page fully loads it starts a function, I would like when clicking a button that same function initializes again by passing a text like Query String. I have the code:…
-
3
votes2
answers31
viewsHow to do more than one type="radio" field without losing value?
I am making a form and it will have two fields for selection of items, ie they are type="radio", only that the following problem happens when it selects an alternative of the first question ta…
-
3
votes2
answers65
viewsInsert variable in jquery Animate value
I’m trying to insert this value in scrollTop but it’s not returning, some problem? var top = $('.sku').offset().top; $(window).animate({ scrollTop: top }, 500)
-
3
votes1
answer122
viewsEffect on jQuery does not work with datepicker
Galera mounted an input with an effect, which occurs when entering a value in the input, the problem and that the same effect does not work using the Picker data in the input. That is when you put a…
-
3
votes2
answers2116
viewsReal-time Google Maps Update
I’m using the Google map to show objects in real time. I did a function in Javascript which is updated every 3 seconds and in this it updates the marked ones in the Google map. Something like:…
-
3
votes2
answers101
viewsLimit typed number
I have a field number where I need to type a value from 0 to 25, in case the user type a number above 25 he does not allow, I tried to use the max="25" but it only blocks if the person does not…
-
3
votes1
answer53
viewsRemove first <p> tag and last </p> string tag with jQuery
I have a string with several HTML tags. I want to remove only the first tag <p> and the last tag </p> of this string. I found solutions that remove all tags but these do not serve.…
-
3
votes1
answer59
viewsI need to auto-fill an input
Good afternoon, I would like help to make a self fill document.getElementsByClassName('nightlife_drug_quantity')[0]; I need you to always complete this with number 50.…
-
3
votes1
answer106
viewsWhat happens if I don’t use the Slim version of jQuery with Bootstrap?
In the Documentation of Bootstrap 4, it guides you to use jQuery’s Slim build. Is there a problem using the normal and full version of jQuery in my project? Is there any incompatibility?…
-
3
votes2
answers2998
viewsTake id onclick and send values via Ajax
I have a list of tasks, it has the status part, which shows for example 'On test' and a button of Approve. I’m trying with that button Approve when clicked take the task id and send an update to it…
-
3
votes1
answer297
viewsI need to fill 2 fields using select
I have a select with the following values in option: <select id="frutas" name="frutas" > <option value="">Selecione...</option> <option value="Maçã - 10.00"> Maçã…
-
3
votes2
answers186
viewsHow to take an image input and display it in the background-image?
I have an input field that should receive an image, when receiving it I should add it as background-image from a div. I used Filereader to get the Base64 from the image. It works fine, but CSS…
-
3
votes1
answer67
viewsChange the height of the div
Hello, I would like to decrease the header height when scrolling the page, and return to normal size when scroll reaches the top of the page. I wanted the Ivs inside the header to be pulled up a…
-
3
votes1
answer110
viewsWriting effect in Javascript
I have a writing effect code, but it only works when updating the page, I wanted it to run automatically, someone can give a strength? Below is the code. what I need to change or add to make it…
-
3
votes2
answers58
viewsHow to use jquery in an Angularjs directive?
I tried to put a function in jQuery within a directive, but it’s not working. I searched and found in several places talking about jqLite, but I could not convert jQuery to jqLite.…
-
3
votes3
answers526
viewsOnblur event cancels the onclick event in jQuery or pure Javascript
I have a field textarea and a "send" button just below, and added an event onfocus and onblur in that field. The onfocus increases the height of the field, and the onblur back to normal. I also…
-
3
votes0
answers44
viewsCan I run these PHP functions via HTML?
You can run these PHP functions via HTML? <!DOCTYPE html> <html lang="pt-br"> <head> <meta charset="utf-8"/> <meta content="width=device-width, initial-scale=1,…
-
3
votes3
answers2011
viewsjQuery Run CSS Animation only when content is visible to the user
I’m using an animation library called Animate.css that can be seen clicking here. But by creating an effect for a particular div the effect is activated even if the div is not being visible on the…
-
3
votes1
answer43
viewshow to replicate jquery functions in javascript $(), Hide()
To create a site, simple in javascript more would like to automate the selection elements, and a function to hide/show the elements. But I end up getting error. But I don’t understand why. To select…
-
3
votes3
answers3825
viewsLimit for sending files
I have a project in Asp Net MVC . NET Framework 4 as follows: View: <div class="file-content"> <label class="custom-file-upload"> <input type="file" id="importar-arquivos" multiple…
-
3
votes1
answer13619
viewsHow popular is a select with Jquery, JSON and AJAX ? (MVC)
I followed some codes I found here of how popular a selectbox, but it is not working, is it missing something ? I’m getting a list of data with my Controller. Javascript $(document).ready(function…
-
3
votes2
answers87
viewsChange attribute of an element without identification
Is it possible to change some attributes of an element without knowing its identification? Example: Change the span text to another one of my interest.…
-
3
votes2
answers4674
viewsPick top, left element position according to parent element
I’m using jquery offset to pick the position of an element and I’m using draggable to move this element. The offset element is inside a div and I would like to take its position by the parent…
-
3
votes2
answers131
viewsHow to insert a TAG with Comma or Semicolon
I found this project to insert TAGS in a form, but it only adds the TAG when enter key, and when it happens in my form it already sends! I would like to know what I should do in the SCRIPT so that…
jqueryasked 8 years, 1 month ago Igor Santana 651 -
3
votes1
answer165
viewsProblem with each jquery
I’m getting via JSON one array, I walk him with the .each() of JQUERY, so I mount my html, and I put it in a div within my page. All this said is done: $.getJSON('http://localhost:8000/produtos',…
jqueryasked 8 years, 1 month ago Renan Rodrigues 3,709 -
3
votes1
answer56
viewsI cannot load a View after calling $.post
I am passing the parameter below (client), from a jQuery function to a Action, through the command $.post (as shown below). The parameter arrives correctly in my action, but I cannot return to View…
-
3
votes2
answers145
viewsObject property from JSON is not accessible
Well I’m working with the framework Laravel in versão 5.2 I’m developing a API where I have a Painel administrativo that produces and manages the content in the case in question produto, and I have…
-
3
votes1
answer464
viewsTaking value from a hidden column of datatables?
How do I get the value of a column with the visible: false? "columns": [ { data: "Nomes", autoWidth: true, visible: false}, ] Example of the Names column, I’m currently doing so.…
jqueryasked 4 years, 9 months ago Everton Figueiredo 520 -
3
votes1
answer48
viewsHow would the code below look in pure Javascript?
I’m having a hard time finding a way for a function to find a variable from another function within my code as I type into a text box, even though the variable is global. I will try through the code…
-
3
votes0
answers37
viewsRefresh in a <li>
I have a content inside a <li> I need to refresh her at the event onclick. But within this li there is a function in php. How would that be possible?…
-
3
votes2
answers85
viewsChange function jQuery
I’m having a problem with a jquery code, I found a code almost perfect for my use, however, it has a function that does not suit me and I can not disable it. This function is that when I click on…
-
3
votes1
answer188
viewsHow to capture click event with mouse scroll?
My doubt is 'simple', but I can find no 'definitive' answer anywhere: You can specifically capture the mouse scroll click with JS? There is the function .click(), that I use a lot, but there is how…
-
3
votes1
answer127
viewsGet sibling id of the item that effected event
I have a table and within the <td> I have two input: <input id="CdProduto" value="15" hidden> <input type="number" value="2" class="form-control"> I need when to change the value…
-
3
votes2
answers580
viewsTake JSON value and set AJAX behavior
How to take the JSON value with ajax and define the behavior, which div and which message to display, for example: If the JSON returns {"error":"true","message":"Algo deu errado"} would display any…