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
answers658
viewsProblem removing elements with jQuery
I am trying to remove fields from a form that are inside a for. The problem is that only the first for element is removed, the others do not work. I think maybe I did something wrong in the…
jqueryasked 8 years, 10 months ago Amanda Lima 3,428 -
2
votes1
answer96
views -
2
votes3
answers1296
viewsjquery to click and make appear/disappear different Ivs
I need to make sure that when clicking on the menu item, a div linked to this item appears on the screen, if I click on another menu item, the previous div disappears and the new div appears... in…
-
2
votes1
answer43
viewsHow do I make a function only run on IE 10 and 11?
I want a chunk of code (a specific function) to run only when the browser is IE 10 and 11, when it is Firefox or Chrome for example, I want that function to be ignored. That’s possible?
-
2
votes2
answers227
viewsFunction in jquery disabled button
How do I make for a div appear when a button is disabled, and when enabled I want this div stay hidden $(document).on('ready', '#btn-cadastra-atividade', function () { $this = $(this)…
-
2
votes1
answer123
viewsIs that piece of code jQuery? And what does it do?
The code snippet below: <script type='text/javascript'> $('#menu #<? echo $idMenuAtivo; ?>').addClass('active'); </script> Is it written in jQuery or Javascript? And what does it…
-
2
votes1
answer1020
viewsShow Middle Screen Upload Image
I have a form and when typing the ZIP code I show a gif of loading while I carry the street, the neighborhood and etc. The problem is that as the user descends the form, the gif of the load does not…
-
2
votes0
answers12
viewsDocument.querySelectorAll in a looping
var linksMenu = document.querySelectorAll(".links-menu"); for (var i = 0; i<linksMenu.length; i++) { linksMenu[i].addEventListener("click",function() { console.log(linksMenu[i]); }); } I cannot…
-
2
votes1
answer92
viewsOpacity in everything except a certain DIV
Good afternoon. I need help with something. However, I don’t have a code yet. I needed something similar to an ad popup. That is, the whole screen gets 'dark' while only the div has focus. I would…
-
2
votes1
answer240
viewsPick up product id with Jquery
I have the following code html: When he clicks delete on div excluir-produto-carrinho he must get the id of the data-id-previous cart. How do I do that? I already tried on the delete button which is…
-
2
votes1
answer266
viewsSelect inside a dropdown using jquery
I can’t get the script to work. I have to do research into the second Dropdown (Scams) and save the ID of the second dropdown to make the Post the ID in the BD Controller: This Controller will seek…
-
2
votes2
answers466
viewsPassing parameters, he.on('click', func);
How do I get past parameters the following way? function hello(msg) { alert(msg); } $('ele').on('click', hello); How can I pass the msg for the function hello(); The alternative with native…
-
2
votes1
answer20
viewsTarget an <ul>l element with class="menus" excluding the others, only one at a time
jQuery(document).ready(function() { $('.heading-list').bind('click',function(){ $('.list').children().css({ 'display': 'block' }); }) $('.heading-list').bind('dblclick',function(){…
-
2
votes2
answers200
viewsHow do I show the description of a T-shirt when I click on it?
My code is like this: <div class='CamisetaTudo'> <img class='Camiseta'>camiseta.jpg</img> <p class='Clique'>Clique aqui</p> <p class='Descricao'>Descrição…
-
2
votes1
answer2248
viewsHow to validate if the date is larger than the other?
How do I validate if the date is longer than the other? I’m using .clone to duplicate the line! function validaData (local){ $(local).find(".calendario").each(function (index){ var dataInicial = new…
-
2
votes1
answer1207
viewsHow to save an html page in java
I have a project that I need to make a report for each code. And save it on disk in PDF format. After generating the report, I don’t know how to pass the page (generated) to Servlet and save it in…
-
2
votes1
answer150
viewsShow data from my site on other sites
I have a website where I want to make a widget (or something). I want to do more or less like some websites do: Give a JS + a div link to the user. It simply puts on the site and appear the data. My…
-
2
votes1
answer316
viewsJqgrid, shows success in loading, but does not mount Grid
I’m with a grid on my website I use the JqGrid. What is happening is that when the data comes back from the request, they are formatted the right way because the data itself JqGrid enters the method…
-
2
votes3
answers3134
viewsAdd or Remove Class from a DIV by clicking
Hello guys I’m wanting to make when I press 1x on DIV "packages . PA" it will make the changes: classify .select CSS: #bottaaoPA: Display:Block ; CSS: bottaaoPB: Display:None; CSS: bottaaoPC:…
-
2
votes3
answers1955
viewsAjax works locally, but does not work on the server
I have an application on Asp.net mvc 5 where the code below works locally (visual studio 2012), but does not work after the publication on the server. controllerAction = "/Controller/Action/"…
javascript jquery asp.net-mvc ajax visual-studio-2012asked 8 years, 10 months ago Thiago Rodolfo 129 -
2
votes0
answers366
viewsAjax returning HTML along with JSON
The code I made was working normally but suddenly it started to behave differently. I’ve done all the debug possible, take a look $( function(){ // When submit it…
-
2
votes2
answers78
viewsJavascript code optimization (Jquery)
What is the best way to write the following code, in Jquery? document.getElementById("jogador").style.top = parseInt(document.getElementById("jogador").style.top) - v; Since the beginning of the…
-
2
votes1
answer19
viewsIn jQuery, how can I make a selection of an element using "this", inside one I’m already selecting
I tried to do so: $(document).ready(function(){ $("#formulario").submit(function(){ //Esse trecho não funciona $(this "input").each(function(){}); }); });…
-
2
votes2
answers4704
viewsCount elements within a parent div separately
In Jquery it is possible to count the number of equal Ivs within another using the $(".pai .filha").length;. Example: <div class="pai"> <div class="filha"></div> <div…
-
2
votes1
answer37
viewsHow to join texts in a textbox by dragging them?
I have an empty textbox, and I have some buttons with values like: +, -, *, /, palavra1, palavra2 so on and so forth. I want to fill this textbox by dragging these buttons into it, not just by…
-
2
votes3
answers266
viewsSend what is being typed from one input to another in real time
Hey, you guys! I don’t understand Jquery or javascript, only PHP. I am struggling to create an INPUT 1, which in real time, sends what is being typed to an INPUT 2, without spaces or special…
-
2
votes1
answer343
viewsHow to return POST in the same div in which it is executed AJAX
Actually there are 2 problems: 1º I have a DIV CONTENT where I open via AJAX the content in it, the same is happening like, if I click 2 time on the same link he instead of reloading the page he is…
-
2
votes1
answer702
viewsCompare current url to href
My scenario is this, I have 3 links and I need to identify which one is the same as the url current. <a href="meulink">Menu 1</a> <a href="meulink2">Menu 2</a> <a…
-
2
votes2
answers885
viewsHow to add an animation button to go back to the top of the page using the easings library?
The search for effects to add on a button like "Back to Top" found this jQuery library that uses the Transition CSS, SCSS and jQuery itself to make animations, but I couldn’t add them to the top…
-
2
votes2
answers863
viewsSwap image by clicking it (JS, jquery)
I want to click on an image, and when I click on it, it will pull an api and I want the image to change to another one, only I can’t change the image. Note: the API is working, I just need to know…
-
2
votes1
answer1488
viewsLoad javascript function automatically into the body tag
I need your help. I’m using the Loadgo Jquery and would like to know how to call a function to automatically load from the tag body, so that when you click on the page, it opens automatically. I…
-
2
votes1
answer1207
viewsChange variable when selecting another value in select in JS
How could I change the param value for what I selected in select? param is in the link I’m sending to another page. It would only be the id I selected in select. var meu_select = $('#meu_select');…
-
2
votes1
answer674
viewsPHP + Jquery + JSON
Have function calling an ajax. As follows below: function verifica(){ var meuid = $('.meuid').attr('id'); var datas = "user="+meuid; $.ajax({ type: "GET", url: 'sys/stream2.php', data: datas…
-
2
votes1
answer2910
viewsHow does the 'Shown.bs.modal' event work?
The doubt is simple : How the event works¹ shown.bs.modal in Boostrap CSS? How could I create something like this event ? ¹ - Not how it works to use this event, but how the plugin has a special…
-
2
votes1
answer1038
viewsHow to remove duplicate lines from txt using php?
Well I’m creating a div which is updated every x seconds and I am displaying the users currently logged in, but my code is inserting every update the same record. Is there any way to delete repeated…
-
2
votes1
answer179
viewsjquery account does not work
Hello, I am trying to assemble this code, however it is not working properly, if possible analyze because I did not find the errors... <script src="jscripts/jquery.min.js"…
jqueryasked 8 years, 9 months ago Vinicius Nakamura 27 -
2
votes1
answer885
viewsBootstrap Datepicker in mm/yyyy format set maximum date
I’m using Bootstrap Datepicker in mm/yyyy format, but I’m having trouble defining the longest possible date.The Code is like this: $('#mesVigencia').datepicker({ format: "mm/yyyy", startView:…
-
2
votes1
answer835
viewsHow to pass dynamic variables from a url to php via ajax
First of all I have looked in several other posts on the subject here and I did not find what I need, my scenario is the following I am generating several EX links: challenge.php? id=2&name=Joao…
-
2
votes4
answers1339
viewsSend PHP command via Ajax?
There is how to send a PHP command via Ajax? For example: $.ajax({ url: 'index.php', type: 'POST', data: '<?php echo "teste"; ?>', success: function(r) { $('body').html(r); } }); In case, I’m…
-
2
votes3
answers117
viewsFunction on the hyperlink
I am running a function on the hyperlinks of my system, as shown in the code below: <md-menu-item ng-repeat="insumo in insumos"> <a href ng-click="verificar('mostrarInsumos',…
-
2
votes1
answer71
viewsHow to Recreate an Array with new values
How do I take an array in Jquery that has for example 3 numeric values and recreate it with 3 new values?
-
2
votes1
answer286
viewsFood Field Hidden via Jquery
How do I send a value to a Hidden field via Jquery? I need to send him an array position.
jqueryasked 7 years ago Carmona007 51 -
2
votes0
answers22
viewsSmaller number array length than correct - JS
I am using an array, where when giving a console.log The same shows 2 items inside, just below in another console.log with length it marks 1, but it is certain to have 2 items in the array. Code:…
-
2
votes1
answer79
viewsToggle icon with Jquery
<span class="col-sm-1 text-center"> <i class="taskIcon glyphicon glyphicon-chevron-down" data-toggle="collapse" data-parent="#accordion" href="#collapse1"></i> </span>…
jqueryasked 7 years ago Marcelo Batista 1,617 -
2
votes2
answers83
viewsCount options disabled from a select with jquery
Boas, how can I count options with the disabled option selected and efficiently with jquery?
-
2
votes1
answer59
viewsWorking with <tr><td> to optimize Jquery
I want to study more about <table> <tr> <td> etc, to optimize my projects. Example: I have 4 <tr> with 2 <td> each, when applying a formula in jQuery for example, add…
-
2
votes1
answer347
viewsDoes load method have beforeSend?
I wonder, if in Jquery’s . load() method, there is some way to use beforeSend, just like we use it directly in $.ajax(); Would have? $.ajax({ url: "https://www.blablabla.com.br", beforeSend:…
-
2
votes1
answer395
viewsSubstitute function for jQuery’s . error() function
I need to know what function to use instead of the function .error(). $('img').error(function() { $('img').attr('src','img/erro.gif'); }); jquery 3.2.1 does not have this function. How can I fix…
-
2
votes1
answer140
viewsHow to view jquery in php
How to display in echo jQuery? I tried to do this and it’s not working: public function InsereComentarioNoBanco($ip,$nome,$mensagem,$horario) { echo " <script> $('.nomeClas').hide();…
-
2
votes2
answers684
viewsStart animation when DIV is visible
I inserted some animated pizza graphics on my page, but I would like the animation to be started only when the DIV that holds these graphics was displayed on the screen, someone would know how to do…