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
votes6
answers710
viewsOn Click only works once
I have the following code to show and hide content, but it only works once. When I click again to hide, nothing happens. $(document).ready(function() { $('li[name=music]').off().on('click',…
-
2
votes2
answers525
viewsHow to pass value to label in modal
I fill in the inputs of my modal as follows: <input type="text" id="txtDescricao" name="txtDescricao" minlenght="4" required> Script: modal.find('.modal-body…
-
2
votes2
answers70
viewsProblem with a Javascript function
I have a problem here and I don’t know how to solve, in theory, in my role below 768px was to add the class .navbar-inverse the tag nav, and above 768px is to remove it if it exists, but nothing…
-
2
votes1
answer118
viewsHow to work with @Html.Dropdownlist?
Friends After following the example I made the adjustment in the code, I am not able to send the information to Actionresult @model ProjetoDelphiMobile.Models.cliente @{ ViewBag.Title = ""; }…
-
2
votes1
answer907
viewsHow to create a new img tag with jQuery?
I would like to change the c:\imagem.jpg according to what was selected in the <option id="selecao" value="01">c:\imagem.jpg</option>. Follows the code: <DOCTYPE html> <html>…
-
2
votes2
answers17232
viewsSwap class with javascript or jquery
I have an html menu with a class menu-disable which is when it’s closed, I need to change this class to menu-active which will be when it’s open. I don’t know much about javascript and I needed to…
-
2
votes1
answer1048
viewsHow to show the data of an XML file in an input field with jquery?
I am having to develop a function that reads the information that is in the fields of a file of type . xml in PHP and trying to return this information in the form fields. More so far I can only…
-
2
votes3
answers237
viewsUpdate the jquery title
..... $sqlContar = mysqli_query($conexao,"SELECT COUNT(*) AS ContarTeste FROM teste"); $jmContar = mysqli_fetch_object($sqlContar); ?> <html> <head> <title>Nome do…
-
2
votes1
answer56
viewsDetect ":" and show suggestions with jQuery
I own a textarea and would like to know how to detect the character : and, from there, show suggestions listed in an array with all the possibilities of "auto complete" and go filtering the…
-
2
votes1
answer239
viewsHow to pick up a clicked multidimensional checkbox
I have a checkbox group and I need to get the checkbox that the user clicked, with this, I need to manipulate others who are from the same group. <input type="checkbox" name="grupo[1][1][]"…
-
2
votes2
answers1684
viewshow to get the server date with Jquery
I am trying to get the server date, I know that to get the server date with php, more will be possible with Jquery?
-
2
votes1
answer774
viewsUsing the value of one datapicker in another
I’m trying to use this DataPicker to catch the day he selects, add 7 more days and from these days, return only Saturdays. Follow the code. Code updated, now only remaining to add the 7 days.…
-
2
votes1
answer2513
viewsGet Absolutepath from input type="file"
I am trying to get the complete path of the directory through the file type input, but so far I can only get a previous folder, for example, I have the folder in the…
-
2
votes1
answer1042
viewsReceive URL parameters by JS (jQuery)
I need to capture a parameter from a URL, for example: http://site.com/paginas/**nome-da-pagina** I need to capture the page-name with JS or jQuery.…
-
2
votes1
answer45
viewsHow to add a feature to jQuery?
I have some ready-made functions that format date, take only string numbers, block fields so as not to allow letters etc. Examples: function formatarData(data){ // conteúdo da função return data; }…
-
2
votes2
answers2982
viewsEffect of Parallax when mouse over
I’d like to know how I do that effect that has on that website or in that other. When I move the mouse over the image it moves. An important detail is that no matter where I pass the mouse, the…
-
2
votes2
answers109
viewsArray of string elements
How to transform this Object array from td's localidades = "<td style='white-space: nowrap;'>Sto.amaro</td><td style='white-space: nowrap;'>Osasco</td><td…
-
2
votes1
answer118
viewsHow to navigate a website if a single page?
I want to make one of those one-page websites, but I can’t think of one thing: how can I do that when I click a button it scrolls down the page to the related content? In the menu have to have a…
-
2
votes1
answer931
viewsHow to do regular expression to accept words and then 2 numbers with jQuery, no special characters?
Hello, everyone. Next, I am making a regular expression to accept the following: 02 word. Word and numbers, not just numbers. I’m using this code: $(".inputNomeTurma").keyup(function() { var valor =…
-
2
votes1
answer132
views.load() without replacing, just add
I need to use . load(), the problem is that it replaces the content from where I mark to add what you loaded. I can’t create a new div for it to add the loaded content. Is there any way to specify…
-
2
votes1
answer91
viewsWhy is my radio input returning "on"?
Have this code: $(document).ready(function(){ $("[name='valor1']").on('blur',function(){ $(".empresa1").text($(this).val()); $(".valor1").val($(this).val()); });…
-
2
votes3
answers249
viewsSet JS to calculate the size of a div
I made a one-page website and to calculate the size of the main Divs I used this JS: function tamanhos(){ $('#a, #b, #c, #d').css('min-height', $(window).height()); } $(window).load(tamanhos);…
-
2
votes1
answer580
viewsHow to enumerate page Divs with jquery?
I would like to list all Ivs with spans of id="position" to simulate a classification. Ex: <div id="conteudo"> <div id="time"><span id="posicao">1.</span> Nome1</div>…
-
2
votes2
answers931
viewsHow to put a "loading" image after validation and Submit?
I have the following situation, a form with Jquery validation working. However, as I am sending some attachments in the form via email, I wanted to present an image for the user to wait. Then the…
-
2
votes1
answer219
viewsHow to manipulate a link in href
Is it possible for me to treat a link, for example when I click and the page does not exist, I redirect to some specific place? For an "ops this link does not exist" page for example. Because in my…
-
2
votes1
answer43
viewsIs countdown on the PLACEHOLDER possible?
I would like to know first if it is possible this, and also disable the input where the placeholder is until the count is finished and when the count is finished enable again? any draft? jquery and…
-
2
votes1
answer63
viewsCall off Backspace action
I made the following script $(document).ready(function () { $('html').keydown(function (e) { if (e.keyCode == 8) { ConfirmarVolta(); } }); }); function ConfirmarVolta() { if (confirm("Deseja voltar…
jqueryasked 9 years, 6 months ago Rafael Barbosa 2,855 -
2
votes2
answers54
viewsjQuery each - Clarification
I need every x seconds a li my menu is hidden and I have this code: $('.area-menu .close').click(function(){ delayed(); }); function delayed() { var liMenu = $('.area-menu li').not('.marginless');…
-
2
votes1
answer653
viewsLoad dynamic data within javascript
I’m trying to upload dynamic data from the comic book, but it doesn’t show up. $(function () { var divContent = $('#formularioVeiculo'); var botaoAdicionar = $('a[data-id="1"]'); var i = 1; //Ao…
-
2
votes2
answers11133
viewsNo 'Access-Control-Allow-Origin' header using php
I am trying to make a simple request via localhost to an external server, but without success. Can anyone help me? $(function(){ jQuery.support.cors = true; $.ajax({ type: 'get', crossDomain: true,…
-
2
votes1
answer1209
viewsRedirect to another page
Colleagues. How I would make the user when closing the browser or tab, was directed to another page, but that did not work when F5. I say this because I have a system that has online and offline…
-
2
votes2
answers1817
viewsPlace Json value on variable
What I’m doing wrong? var GETEstado = $(this).val(json[0].GETEstado); alert (GETEstado); The Alert is exhibiting [Object Object] My complete code: $(document).ready(function () {…
-
2
votes1
answer178
viewsnoClonflict() jQuery - No longer works
Hello, I was using jQuery’s noClonflict() to not have conflict with the site http://www.casadoboteco.com.br/ Initially it worked, but after a few days is giving trouble again. It is giving conflict…
-
2
votes2
answers794
viewsGet information from the customer
This may sound like a silly question, but I’m kind of in trouble here. I need to collect through the browser some information that helps me identify the client that is browsing. I already know the…
-
2
votes2
answers551
viewsWhat is the THIS parameter for?
Something I always see in a lot of code around is the parameter this. Ex: $(this).funçao-variável... I’ve been told that the this serves to "reference" something. But, it was not very clear. Does…
-
2
votes1
answer155
viewsPassing data through Jquery
I’m trying to pass some data via Jquery to another php page. I create the tag < a > via echo: echo "<a id='".$feed_id."' class='like'> Teste LINK </a>"; • The $feed_id variable…
-
2
votes2
answers2640
viewsTake data attribute value and apply as text in another html element
I have a series of checkboxes in an interface that are already configured to display/hide other elements of the interface conditionally. In this same interface I have a div set to display messages…
-
2
votes2
answers998
viewsScript open only after given time
I have a script, but it opens as soon as it is loaded. I’d like to have him run after 10 seconds and open along with my div, she’s like this: <div id="mame"> CONTEUDO </div>…
-
2
votes2
answers367
viewsPass jquery variable in filename - as if it were get
Holá, guys, I’m not getting information about this because I don’t know how to look, I tried to get variable jquery, and things like that and didn’t return what I need. It is as follows: I need to…
-
2
votes2
answers1021
viewsProblem to get input value with javascript
I’m taking the value of input via JS and sending via GET to another page. The problem is that when I type space in the input, I can’t get what I wrote after space. If I type for example: Ana Maria…
-
2
votes2
answers1909
viewsHow to get the element id from its class
I have the following list: <ul id = "qualquer"> <li id = "listitem1" class = "middle_item"> </li> <li id = "listitem2"> </li> <li id = "listitem3"> </li>…
-
2
votes1
answer45
viewsHorizontal scroll when pressing tab
I have a table based on the plugin Datatables and with it, I fixed the first four columns of my table that may have n columns - they are generated the basis of a database query - and, fixed columns…
jqueryasked 9 years, 6 months ago Rafael Barbosa 2,855 -
2
votes1
answer252
viewsNice Scroll does not work
I need to leave my page with smooth scrolling. Searching in the community I found the plugin called nice scroll. I implemented it and it worked only on Google Chrome and Opera, but not on Mozilla…
-
2
votes2
answers853
viewsHow to get input value by clicking the div(multiple Divs with the same class) with jquery?
I have the following code: <div class='premios text-center col-xs-12'> <div class='div-img-premio'> <img class='img-premio img-responsive' src='$imagem'> </div> <p…
-
2
votes1
answer484
viewsGoogle follows URL from data-href?
On my site there are links to certain Urls that open with Jquery and the data-href attribute. This attribute is inserted into a normal div that functions as a button. Ex.: <div class="open_url"…
-
2
votes1
answer143
viewsHow to use Session to prevent a modal from opening again?
I have a website in HTML, in the index I put a modal to open as soon as the person enters, this modal is to collect the email of the person, however every time the person updates the site the modal…
-
2
votes2
answers752
viewsToggle between hiding/displaying Ivs from links
I’m trying to adapt this script, which I found in this excellent reply from Soen, so that when there is a click on the link, the divs alternate. On the page there are several Ivs, and each one will…
-
2
votes1
answer175
viewsForm with datetimepicker
I am developing a scheduling system and I am using the datetimepicker to make the appointment. I need a help with json; I need to block the dates that are being used so that they cannot be selected.…
-
2
votes1
answer71
viewsShow and reset <select> with the jquery checkbox
In the example code attached, the item value is multiplied by the value of the respective select and displays the subtotal and total. My question (of beginner), is how to hide and remove the…
jqueryasked 8 years, 8 months ago Danilo Fagundes 97 -
2
votes2
answers425
viewsHow to get the last (max) tabindex from an html form using jQuery
I need to get the last 'tabindex' of a form for when the user clicks 'tab' or 'enter' back to the first. Follows current code: $(':input').keydown( function(event) { if ( (event.which === 13 ||…