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
-
7
votes1
answer3054
viewsDoubt about double exclamation (!!) in javascript / Jquery
I saw its use in the source code of Jquery, for example: fired: function() { return !!fired; } Code snippet located between lines 3222 and 3224 of version 2.1.4 Uncompressed. She’s something native…
-
7
votes1
answer1441
viewsUnique identifier of a Smartphone
I am developing a system and need to capture a unique identifier of the Smartphone. In this case, the person would access the site by Smartphone and the site will capture some unique identifier of…
-
7
votes3
answers1160
viewsHow to set number of times the setInterval will be executed?
It is possible to control the number of executions of setInterval? I made a script very simple where I wanted to div flash 3x to alert the user. But in script that I made it keeps blinking straight.…
-
7
votes5
answers106
viewslink is not called
I have a code jQuery that generates a div it works smoothly, in it I have the following excerpt div += "<p>Coloque o seu <a class='text-orange' id='link_new_ad'>veículo a…
jqueryasked 8 years, 11 months ago Marcius Leandro 462 -
7
votes1
answer85
viewsMechanisms for form validation
What are the pros and cons of validating forms with these features: HTML5? Javascript? Jquery? HTML5 + Javascript/Jquery? There is something to consider beyond these items?…
-
7
votes4
answers2128
viewsHow to create a custom context menu?
When right-clicking on certain areas of the page appears the Popup browser default: I’d like to show my own Popups customized! It is possible to intercept the click and open a different menu? Note:…
-
7
votes1
answer3632
viewsHow to know which jquery version was loaded
The code below shows me perfectly if the jQuery was or was not loaded: if (jQuery) { $('div#home_login').attr('style', 'background: green'); } else { $('div#home_login').attr('style', 'background:…
-
7
votes2
answers11472
viewsJust grab a div from another page via jQuery
Grab content from another page by javascript or jquery On another question I wanted to know how to get content from a page. In this I wanted through this code to catch only one <div> instead…
-
7
votes1
answer259
viewsHide Divs with similar ID
I have several tags div with the similar id, they all start with cn-, example: <div id="cn-name">...</div> <div id="cn-email">...</div> <div…
-
7
votes1
answer791
viewsForm Validation with Jquery
I’m a beginner in jQuery and I’m having a hard time doing a form validation with jQuery to the CRM of a church that is next: I have a code HTML that is part of a CRM that I am developing. In this…
-
7
votes2
answers8300
viewsHow to create a toggle on and toggle off button?
I have seen that in some registers, they are using the button a lot toggle. Someone would know how to do it?…
-
7
votes1
answer726
viewsHow to insert returned value into form fields with jQuery?
Accurate, after consulting in BD insert returned values into fields of a form, as I will use these fields to make a change to the BD, the call to search is working correctly and is configured this…
-
7
votes5
answers34006
viewsHow to return the last record of an array with Javascript or jQuery?
I’m making a custom search filter where the user can select the brand and product features and I return their id. But I wanted to return only the last record of mine arrays where they contain all…
-
7
votes1
answer3337
viewsSend data to controller via Json
I am trying to send via Ajax some data from my form. In this form, I have fields inputs normal and a list of vendors I previously selected via checkbox. Follow screen: I am creating the JSON object…
-
7
votes1
answer218
viewsExtender plugin jQuery
I’m working on a project that uses the library X-Editable with Bootstrap 3. Throughout the page are several instances of the plugin, however, there was a need for some instances to have a different…
-
7
votes1
answer507
viewsCustom HTML attributes
I am developing a system aimed at managing public tenders and I need it to be compatible with as many devices as possible. In some situations it was necessary to use custom attributes, example:…
-
7
votes2
answers18567
viewsPick select selected (only picking first value)
An Alert is displayed (with the sweetalert plugin) and in that Alert has a selectwith names. After selecting the name, the person has to click the button Add, when the person clicks the function of…
-
7
votes4
answers16671
viewsSynchronous Xmlhttprequest error on the main thread is deprecated
When I use this code in my file, an error occurs in the log, and ends up giving problems in other javascript calls. Current page file (the problem javascript is at the end): <html>…
-
7
votes4
answers147
viewsIs there any way to decrease this script without losing functionality?
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-2.1.4.min.js"></script> <script> $("div#contenthead div.left span").hover(function() { $("div#contenthead…
-
7
votes3
answers633
viewsAdd class to a datatable
I’m making changes in a pagina.aspx of a system, however many things are generated through language functions. Since I can’t add a class via code, I’m trying to add via jQuery, but I’m not getting…
-
7
votes3
answers1977
viewsHow to attach events to dynamically created elements and pass parameters?
I have a table that is generated via ajax and a certain column generates a link. As it has been implemented, currently, it writes a code html with javascript intrusive. Something like below: return…
-
7
votes2
answers1691
viewsHow to make a Function wait for jQuery loaded with the async tag
I’m having a problem making a Function wait the loading of the package.js with the async tag <script id="packjs" async type="text/javascript" src="pacote.js"></script> This file contains…
-
7
votes2
answers542
viewsMove div while hovering
How I create the effect similar to this site: http://www.amgrconstrucoes.com.br/lancamento When passing the mouse over the div that contains the image of the enterprise appears another div on it by…
-
7
votes3
answers1301
viewsHow to catch the element where my cursor is?
I’m creating some functions for the text editor Alloyeditor. Then I came across the need to acquire the element in Jquery that the cursor is present. I just don’t know if there is any way through…
-
7
votes2
answers136
viewsImprove code jQuery
I made a simple code for a button to open a sidebar, but I find this code repetitive, I wonder how I can improve it. $('.openbtn').click(function(event) { event.preventDefault();…
-
7
votes2
answers2239
viewsEnable and Disable Save Button
I am developing a Revenue/Expenditure launch system and it works according to what I initially need. Lawsuits. Revenue Launch, add the Revenue value to the account table. Example: Opening account…
-
7
votes1
answer316
viewsproblem in resize.js function
I’m having a problem not being able to send the original name of my images for the database it is stopping in my function reside.js more precisely where is this stretch _this.output(canvas,…
-
7
votes1
answer1874
viewsWhat are the differences between properties and attributes in HTML?
When trying to use this code: $(document).ready(function(){ $("#selectAllBoxes").on("click", function(){ if(this.checked){ $('.checkBoxes').each(function(){ $(this).attr("checked", true); }); } else…
-
7
votes2
answers93
viewsSyntax error jquery
Hello I’m having a problem with the use of this code. I want inside the div with class output to show the following html code, this code is inside a for so I used the append, here is giving syntax…
-
7
votes3
answers1068
viewsHow to implement a "scroll Hijacking"
I have noticed in several modern pages a scroll behavior that goes up to certain interest part of the content, researching, I found that this type of behavior is called "Hijacking". The term…
-
7
votes3
answers340
viewsPosition caption above div
I am using the bootstrap Carousel with caption. Between the slide image and the caption there is a div with the image of an orange triangle. I need the caption to be above the triangle. I’ve used…
-
7
votes1
answer8313
viewsjQuery Mask plugin for CPF
I would like to know what I am doing wrong. I am using this plugin https://github.com/igorescobar/jQuery-Mask-Plugin to try to apply a cpf mask (need to be through CDN) but when I enter the data in…
-
7
votes2
answers3051
viewsOpen link in a new tab without target or window.open
I have a function that does a redirect: vm.pagarUpload = function() { $http({ method: 'POST', url: API.url + 'app/service.php?t=pagarUpload', data: { nome: vm.nomeUpload, email: vm.emailUpload, cpf:…
-
7
votes6
answers2555
viewsHow to change the title element text?
Follows code: $(document).ready(function() { $('#1ano_card_title').text('R$20,00'); }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <h2…
-
7
votes1
answer173
viewsHow to insert 2 inputs into the same TD with duploclick?
I would like to insert 2 inputs in a td, today my code works with only one input, and even saved the information in the database, but I need to include one more input to be inserted a password to…
-
7
votes1
answer325
viewsHow to read a JSON file to render HTML list
I am having a difficulty in an application that reads a json file and renders in HTML, I am not able to access the object correctly, the variable products is as Undefined. Could someone help me? if…
-
7
votes2
answers630
viewsHow to check if any text was selected before copying it?
I have a table with several information, in local server. I use a jQuery to detect when I click on a line and pass this information via GET. On the same page, I treat this information with PHP…
-
7
votes4
answers349
viewsHow to make an element cross the screen continuously and always visible?
I have a CSS animation of an element that crosses the entire screen, from right to left, continuously infinitely: #slider{ position: absolute; top: 50px; right: 0; background: red; width: 150px;…
-
7
votes1
answer190
viewsHow do I pause a script when I leave the page?
I have a Javascript function that loops, it controls one element of the page that switches places with another, my goal is when you leave the page, this function stops and only comes back when the…
-
6
votes6
answers2089
viewsHow to change the bottom lines of a table alternately? With support for older browsers
My table is created with a PHP loop. I do this by PHP even adding a condition or has some better shape? if ($nomSenha == 'xxxxxxxx') { echo '<table class="pesquisaClientes">'; echo…
-
6
votes2
answers3548
views -
6
votes3
answers946
viewsRun function for each class you find
I’m creating a mural of images inside thumbnails adjusting them automatically, where I use the calculation below: if($('.thumb img').width()<$('.thumb img').height()){//portrait $('.thumb…
-
6
votes6
answers5183
viewsHow to reverse the position of a div(and its content and attributes) with another div?
I wish to do this with jQuery, which is the most elegant way to do it? Assuming the following scenario, how would it look if I wanted to switch from position to div2 to div3? (I will not post my…
-
6
votes1
answer517
viewsIs there a safe way to check the loading of frames in an HTML page?
Some time ago I built a tool with HTML and Javascript to help debug a family of web applications. Basically, the tool consists of a static HTML page and a collection of scripts that load a given…
-
6
votes4
answers3358
viewsHow to create an element and after a few defined seconds remove it?
I need to create a label warning like this: <p id="lblAviso">Salvo com sucesso</p> And remove it after 3 seconds. How to do this with jquery? Needs some plugin?…
-
6
votes3
answers490
viewsScroll bar not hidden in Internet Explorer
I’m creating a site where I use various elements div page size, and links in the top menu that directs to these div, making a page scrolling effect every click. My problem is that in Internet…
-
6
votes2
answers230
viewsHow to avoid animation of elements that will not fit in the width of the screen?
I created an animation in jQuery for a customer’s Christmas card. However, on 1024x768 or 800x600 resolution screens, elements appear in strange places: The code below hides the balls at startup,…
-
6
votes7
answers19609
viewsHow to catch an element inside an iframe?
Why doesn’t it work .contents()? How to catch an element inside an iframe as in the jQuery API example <!doctype html> <html lang="en"> <head> <meta charset="utf-8">…
-
6
votes3
answers427
viewsHow can I include the 'Submit' button in the 'POST' matrix generated by 'serialize'?
On the forms, I have the button like submit that when clicked will be intercepted by jQuery in order to make validations to the content of the form before sending it to PHP process via Ajax. Form…
-
6
votes1
answer2022
viewsHow to pass values of an Ajax request to Google Chart?
I started messing with Google Chart today, and I can make the chart by putting the values in hand outside the requisicao ajax. Only that my application needs this data coming from a database and I’m…