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
votes1
answer54
viewspass from Jquery to CSS3
Some way to do this in CSS3? if(window.innerWidth <= 1000) { var ecra = window.innerWidth; $(".topo").css("height",ecra*0.293); } I tried to @media screen and (min-width: 0px) and…
-
2
votes5
answers711
viewsChange Divs with the same class
<table> <tr> <td class="valor"> 33</td> <td class="valor"> 88</td> <td class="valor"> 55</td> <td class="valor"> 36</td> <td…
-
2
votes3
answers809
viewsOpacity according to page scroll
I have the following complication: $(window).scroll(function() { $('ID').css('opacity', parseInt(1 - ($(this).scrollTop()/100)*1)); }); In this code I can put opacity: 1; when the scroll is at the…
-
2
votes2
answers1724
viewsChange one combobox from another
Colleagues. I have a combobox that has the relationship of hotels: <select name="Hotel" id="Hotel" class="form-control"> <option value="Selecione">Hotel</option> <option…
-
2
votes1
answer32
viewsRemove object over time
Well, I have the following modal <div id="alerta-imagem"> As imagens de perfil precisam ter altura e largura proporcionais, com tamanho máximo de 200x200 </div> I googled a few ways, but…
-
2
votes1
answer352
viewsOverlaid graphics
I need to make a chart like this But I haven’t found anything that can help me. Does anyone have any solution to this?…
-
2
votes2
answers1231
viewsChange variable value in Ajax
The Problem I have the variable flagExistenciaArquivo, and I need it updated if the file exists or not. I call the function verificaExistenciaArquivo within another function, setting as parameter a…
-
2
votes2
answers21331
viewsHow to make a "back to top" button on a page?
How can I make a button return to top on an html page? Jquery, javascript, which would be best?
-
2
votes2
answers355
viewsSplit Divs into group with jquery
Assuming I have 4 Divs whose class is "block". With jQuery would like to divide the Divs into blocks of 2, and "encompass" each set of "blocks" within another div. I would like to make the code very…
-
2
votes4
answers2059
viewsHow to Verify the existence of an Id in a document via Jquery?
I am programming the system of my TCC and in it I am creating a site that contains two types of ID in the Div container of each page: fundo_index on the Index and fundo_base in other pages. I need…
-
2
votes1
answer71
viewsImage repeating
I implemented a code on my site, this is a retractable chatbox. It has two images, one of these is to open the chatbox and the other to close. However, when you open the chatbox, it gets two images…
jqueryasked 9 years, 2 months ago Fábio Ferreira 147 -
2
votes2
answers3084
viewsSwap div of place with jquery
Let’s say I have one div Mom, and inside that div I have another 3. And a Button. <div id="mae"> <div id="a" class="child"></div> <div id="b" class="child"></div>…
-
2
votes0
answers353
viewshtaccess configuration to capture all GET data from a query string
I rewrote my url rule as follows: RewriteRule ^(.+)$ index.php?path=$1 [QSA,L] In php I get the parameters of $_GET['path'] and configure my controller, action and parameters. $this->controlador,…
-
2
votes2
answers117
viewsevent with jquery
In Html we have: <div id="t1" > </div> <div id="t2" > </div> <div id="t3" > </div> No js temo: var aux="#t"; var count=0; $(document).ready(function(){…
-
2
votes1
answer645
viewsPHP Upload ajax of miscellaneous files without Submit
I need to upload without leaving the page, I believe the best would be ajax, correct? I found some post here on Sopt, but I could not adapt my need. I need to send these two fields, one of file and…
-
2
votes3
answers71
viewsCatch the week correctly
Colleagues, How would I get to pick up the week of a given month? For example: if next week the user accesses the system (today is day 18/11/16), would appear: Current week: day 20/11/2016 to…
-
2
votes3
answers1491
viewsHow to get the link id with jquery
I have a grid and in the last column I will have a link that will be following format: id.1 id.2 id.3 id.4 I would like to click on the link <a id="id."'.$row["id"].' href="#"> Jquery identify…
-
2
votes1
answer42
viewsDynamic button creation
Hello. I’m hitting myself to create a button for every result that the $.each generates. $.each (data, function(index, orc){ $html += '<div>'; $html += '<button type="button"…
-
2
votes3
answers2346
viewsHow to find 2 or more words in a text using jQuery?
Hello, I’m doing a search field where it brings the data from an XML. However, it is only bringing if I type the name in the right order, for example: in xml, the name of the person is "Manoel da…
-
2
votes1
answer76
viewsHow to simulate this PHP function in jQuery?
The function below made in PHP will return me an array where the searched word fits, as I can do the same though with jQuery? $meuArrayMultidimensional = array(array("campo" => "teste"),…
-
2
votes0
answers83
viewsdoubt if fields
I have a form where the user can search for a date range, or by id, name, nif I have the following code: $("#pesquisa").on("submit", function (event) { event.preventDefault(); var key =…
jqueryasked 9 years, 2 months ago usersantos 765 -
2
votes1
answer676
viewsCompare system time to set time in a variable
How do I compare system time to a time set in a variable in jQuery or Javascript?
-
2
votes2
answers3506
viewsPop up only once per user - Cookies
I’m with a POPUP on my website that appears whenever the person updates or enters it. I want to create a function javascript (for the page is in HTML and can not use PHP) so that the POPUP only once…
-
2
votes2
answers383
viewsJquery Focus() in Firefox
Good morning, I have a problem with firefox. I have a methods that clears an input with a value I consider invalid ai in the sequence I give Focus to that input. In Internet Explorer and Chrome it…
-
2
votes2
answers1455
viewsLoad remote content into a Twitter Bootstrap modal
I’m trying to load the contents of a modal from a remote page. This is the code I’m using to run the tests. $('[data-load-remote]').on('click', function (e) { e.preventDefault(); var $this =…
-
2
votes1
answer1148
viewson('click') running more than once
When I click on an area and then on the button. mais1 for the first time performs the function correctly but if I click one area then another and click the button . mais1 it performs the function…
-
2
votes1
answer380
viewsHow to turn off the webcam using the Saycheese plugin?
My doubt is simple but I’m not getting it. I’m using a simple and basic Javascript plugin called Saycheese for my webcam in a C# MVC web project. My question is: How to make the webcam off when the…
-
2
votes1
answer1201
viewsAsynchronous paging with Laravel
I made a simple pagination with the laravel using the return of ->paginate(), however, as you know, it is not an asynchronous action, which makes paging bad. I found some examples, but I couldn’t…
-
2
votes2
answers4673
viewsHide/Show when checkbox is checked or unchecked
How can I check if a checkbox field is checked, and according to its state, hide or show another input field, example: <label> <input type="checkbox" name="check" /> Clique aqui…
-
2
votes2
answers3467
viewsHow to edit HTML table data with jquery
I am creating a registration page where I can only use HTML, jquery and css. Once registered, the information must be in a table below and this table, the data must be able to be changed However,…
-
2
votes2
answers79
viewsRemove Download after page fully load
I have a custom Clicker that appears on the screen while loading. When I’m done I need this Clicker to disappear, so there’s nothing wrong. The problem is that the page is still doing some processes…
-
2
votes2
answers862
viewsCancel <a> tag click event
I need to create a Javascript function that is called when clicking a button and must cancel the click of a tag <a>. I tried this way: $("#botao").click(function(){ $("a").unbind('click') })…
-
2
votes2
answers976
viewsTypeerror: $(...). error is not a Function
I have an error code in the latest version of jQuery v3.1.1 In version 1 there is no error. Here’s the code: //IMAGE ERROR $('img').error(function () { var s, w, h; s = $(this).attr('src'); w =…
-
2
votes4
answers4978
viewsValidating Date of birth
Hello, I am trying to validate birth date less than 15 years using the following rule: 1- If the user enters the date of birth, check if the day, month and year the user has typed, corresponds to…
-
2
votes1
answer232
viewsIdentify a long click with jquery
Galera I set up a context menu that works like this, when the user right-click on a 'tr' table it opens. I do so using jQuery: // Verifica se abre o menu $("tr").mousedown(function (e) { //AQUI FICA…
-
2
votes1
answer94
viewsHow to implement jQuery Filer Plugin?
I’m trying to implement a component for uploading images with thumbnails, and I’ve spent a lot of time looking for one that suits my needs. After a day of searching I found jQuery Filer. Anyway, I’m…
-
2
votes2
answers564
viewsCall in function jQuery does not find file
I made a function jQuery and in the URL passage he is not finding the file. I found it strange he does not find, because the file exists. Every call I have within the site, is always the same, be it…
-
2
votes1
answer229
viewsSend more than one JSON file in a single AJAX request
I’m requesting two JSON files by Jquery’s getJSON function. I’m trying to send them through AJAX but I’m not getting through. I did the following: var data = '[{"agents": '+agents +', "projects":' +…
-
2
votes0
answers65
viewsMousedown in Chrome 55
I use the event mousedown in JS to assign an action to my object in a project in question. With the new Chrome update to version 55 my event no longer works! Does anyone have any idea how to use the…
-
2
votes2
answers413
viewsMy jquery Cycle 2 slide code does not work. Wondering where the bug is?
I’ve been trying to get this slide to work for a long time, but it doesn’t work at all, I wanted help from you. My Html code: .slideshow{ width:100%; max-width:980px; overflow:hidden; height:505px;…
-
2
votes2
answers353
viewsHow to remove only the parent element, without removing the children
How to remove only the parent element, without also remove child elements with jQuery. Having this structure for example: <a href="#"> <p>A</p> <p>B</p>…
jqueryasked 7 years, 11 months ago Tales Breno 369 -
2
votes1
answer148
viewsSending post to Actionresult via knockout
Speak people, next: I’m trying to send one post using the ko, for a method ActionResult of my controller instead of a JsonResult as usual. When debugging the project it enters the ActionResult but…
-
2
votes1
answer366
viewsLoad HTML into received DIV via AJAX request by converting special characters
I am maintaining an application where there is now the need to load an HTML from the database into a div. Regarding the return of this database HTML, it’s cool, I already receive the values in a…
-
2
votes1
answer2635
viewsCheck if a value is inside an array
would like to do the following: User inserts their zip code and a field input and the value that he entered within this field wanted to compare whether it is in the CEP range (01000 to 19999) of the…
-
2
votes2
answers276
viewsPrevent form Ubmit, but allow other actions by typing enter in an input
I have a input text within a form, however I do not want the form is keyed ENTER. The code below works, but if I decode the alert the form is submitted even having the two lines below. Can anyone…
-
2
votes2
answers282
viewsHow to work with jQuery autocomplete?
I’m using autocomplete from jQuery, but I’m having the following problem: In the first line of <select> I’d like the famous to appear "Escolha abaixo uma opção" <option value="">Escolha…
jqueryasked 9 years, 2 months ago Carlos Rocha 1 -
2
votes1
answer263
viewsEnable field by selecting "Type"
I have the following field: <div class="line"> <label class="control-label">Tipo</label> <select class="input-xxlarge idTipo" name="idTipo" id="idTipo" onChange="getParametro()"…
jqueryasked 9 years, 1 month ago Sr. André Baill 6,946 -
2
votes1
answer274
viewsHow to recover the value of multiple dropdownlists (only filled)
How can I recover the value of several dropdown (only filled) The function below does not work correctly. For example, if I select only the second combo has as output: ,2 It picks up the void as if…
-
2
votes2
answers307
viewsCalling function outside the scope in javascript
Follow the code to explain my mistake: class Cliente { showName(name) { alert(name) } getName(){ $.get(minha-url) .done(function(data) { this.showName(data.name) }) } } The getName method returns an…
-
2
votes2
answers4321
viewsFormatting date and time with Javascript?
I’m consuming data from a API and would like to know how do I pass the following date and time value, to the Brazilian standard. The format returned is this: 2017-01-05T14:35:17.437 but I’d like it…