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
-
9
votes5
answers4508
viewsProblem in video autoplay
I added a video right when starting the site and I wanted it to be on autoplay. I know that if I put it on the page on Html5 it would run as well as I did the test. But as it is inside this box and…
-
9
votes9
answers12142
viewsSearch via ajax during input text ( autocomplete )
I did a search using ajax that when clicking a button triggers a request with the term searched and returns with data that fills a combobox html (select). So far so good. However, I found it…
-
8
votes3
answers20561
viewsHow to create functions in jQuery?
I would like to know the correct way, following good practices, to create functions in jQuery. I’ve used it like this: var focusToEnd = function() { ... } And also so: ; (function($) {…
-
8
votes2
answers3908
viewsHow can I get the first element of each parent element?
I have a structure like this: <div class="container"> <span class="iconset"></span> <!-- primeiro elemento --> <span class="iconset"></span> </div> <div…
-
8
votes2
answers280
viewsTrigger an action when a hash is found in the URL
The idea is to start an animation when a hash is found in the URL. Example Taking the example of a page whose navigation works by hashing: <nav> <ul> <li><a…
-
8
votes1
answer867
viewsHow to return to "waypoint_order" in the Google Directions API?
I’m developing a route mapping system using the Google Maps API. I have the points of origin and destination and between those points there are some points of interest. When plotting the route…
-
8
votes1
answer277
viewsIs it possible to use sub-groups?
I have a form and this has three pairs of start/end dates. For each pair I validate if both dates are filled in or none of them is filled in, because it is not allowed to fill in the start date and…
-
8
votes3
answers2418
viewsForce jQuery event execution order
Suppose a page has several events being associated via jQuery. For example, in a given section, I have: $().ready(function() { foo(); }); And further ahead I have: $().ready(function() { bar(); });…
-
8
votes1
answer506
viewsHow do I catch the current percentage of a download?
I want to get the value of the percentage of an ajax request on an external server. How to do? $("#uptade_space_disk").click(function(){ var url = "/calcular-espaco-em-disco" jQuery.ajax({ url: url,…
-
8
votes3
answers997
viewsHow do I add jQuery library with Javascript?
I would like to know how to load the jQuery library with pure Javascript and run something simple with jQuery after its load? My code is like this: function colocaScript(){ var scriptJquery =…
-
8
votes2
answers579
viewsWhy does setting a CSS property with the ! attribute not work in the . css() method?
I would like to know the real reason for the disability that the function jQuery.css() has, which would be the fact that when using the attribute !important in any assigned CSS property, the same is…
-
8
votes3
answers2145
viewsHow to display the exception message(ex.getMessage()) launched by the server in a jquery ajax?
@GET @Path("boleto/{processo}/{resposta}") @Produces({ "application/pdf","application/json"}) public Response gerarBoletoDividaAtivaComCaptcha(@PathParam("processo") String…
-
8
votes3
answers7891
viewsHow to create a click event that is only called when clicking outside a div?
I need you to click off a div (is a registration screen), the same if close. What selector should I use so that clicking anywhere outside the div that div closes? $(????).on("click", function(){…
-
8
votes3
answers1694
viewsScript is not working in IE
I’m using this script in Chrome and it works normally. But in IE 8 or 9 it doesn’t work. I put a Debugger and an Alert to debug, but it doesn’t even enter the function. $(document).on("mousedown",…
-
8
votes6
answers5717
viewsDisable Chrome Password Save in Javascript
Would you have any way to disable the option to save password in Google Chrome, by Javascript or jQuery? I mean the login password. When my client logs in appears to him the option to save password,…
-
8
votes1
answer348
viewsCollapse Menu after page refresh with localStorage
How can I close a menu and keep it closed after the refresh of the page using jQuery only? It would be something like at this link. By clicking the button the menu is reduced and remains so even…
-
8
votes3
answers267
viewsHave some problem playing the function for variable
Can anyone explain to me if you have a problem playing a function for the variable, for example, in this case I’m talking about the var marcar. In this code is working, I don’t know if it causes a…
-
8
votes2
answers478
viewsHow do I get a loose number in my HTML?
Consider the following code: <span class="test"><span style="color:green">Teste</span>:</span> Text<br><br> <span class="test"><span…
-
8
votes1
answer11801
viewsHas anyone managed to use jQuery File Upload yet?
I refer to this link http://blueimp.github.io/jQuery-File-Upload/. The documentation is very vague. I have already changed the "action" of the "form" but without success. Form Html5: <form…
-
8
votes1
answer394
viewsDIV activating scroll in another DIV even with different sizes
I have two div same height, but with different content. And when I do scroll in one, I wanted the other to follow in the same (or at least close to the same) position. The problem is that their…
-
8
votes1
answer480
viewsHow to mix two colors using Javascript?
There are two fields where the user reports a hexadecimal color. By clicking on mix colors, a calculation shall be made in JavaScript and this will have to present a picture painted with mixed color…
-
8
votes4
answers2040
viewsProblem with height of Ivs that do not accompany each other’s content
I have a problem that I think is easy, but I can not understand how to solve. I have a structure like: <div class="conteudo"> <div class="esquerda"> </div> <div…
-
8
votes1
answer2736
viewsShoot animation with scroll
I tried to include the Fade function in the following elements, but was unsuccessful. The default that shown on the site is this. I want to apply this to tag <p> for when I scroll through…
-
8
votes3
answers16157
viewsAutomatically load content when you reach the bottom of the page
I want to make an automatic page like Facebook, which when it reaches the bottom of the page automatically loads another page with more posts. I’ve already researched the subject and I haven’t found…
-
8
votes2
answers18126
viewsOpen DIV after clicking a Link Button
I would like to know how to create, whether in CSS3, Javascript or Jquery, a button that, when clicking it, is revealed a DIV on it, and opens a new page with target _Blank. I’ve done a lot of…
-
8
votes2
answers10723
viewsGood practices when creating elements with jQuery
When I need to create elements in the DOM through jQuery, I usually use the following syntax: $('<div>').addClass('minha-div').attr({id: 'id-da-div'}); However, what I usually see in Internet…
jqueryasked 10 years, 4 months ago Wallace Maxters 102,340 -
8
votes4
answers19339
viewsHow to go to a link by clicking on a div without using <a href>
I need to redirect the page to a link specific by clicking on a div, without using the <a href> of HTML. I’m using HTML, CSS and jQuery and PHP. Follows an excerpt from the code: <div…
-
8
votes1
answer579
viewsHow to create a default margin in the ckeditor?
I started using Ckeditor And by initializing it, it comes in the following way: And I would like it to come with a standard margin(I want it to look like A4) How could I make him come already with a…
-
8
votes3
answers1513
viewsIs there an application security flaw when using AJAX?
I am a programmer HTML/CSS/PHP a few years and by incredible and more impossible it seems, I’m just entering the world of Javascript with jQuery and AJAX now. My question is whether the security…
-
8
votes4
answers607
viewsGet full number of an input
In a <input>, have the following value: 00001545455 When I recover the same with Javascript, he comes without the first 4 zeros. Can someone help me? I am already passing it in the function I…
-
8
votes1
answer18996
viewsChange address bar url without refreshing page
I am developing an application where a form with a series of <select> send information to a chart loaded via AJAX. I would like these filters to reflect in the browser url, to make it easier…
-
8
votes3
answers1864
viewsHow to return key of object with higher value in Javascript?
Let’s say I have the following object: var obj = {"frutas": 50, "vegetais": 100, "carnes": 150 }; How could I return the key of the highest value item? Example: obj.maxKey(); // "carnes" I tested…
-
8
votes3
answers311
viewsHow to use a different logo if the pattern does not exist?
I would like to know if there is a solution to the following problem, if there is a logo_enterprise image to consider it and apply it to css, if there is no logo_default, that way I could control…
-
8
votes1
answer1935
viewsDiv that can be dragged
I would like to allow users to move some things from my site. Of type, the user could drag the menu to another place to better position the reading.
-
8
votes3
answers1459
viewsHow to get only the second class with Jquery?
<td> <input type="radio" value="5" name="Form1a1" class="abobrinha Form1comentarioA" /> </td> I have 2 classes inside in my radio input, in jQuery I would like to select only the…
-
8
votes1
answer620
viewsHow to center a binary tree?
I need to correctly center this binary tree model. jQuery or JavaScript can be used. I’ll need to generate the code with PHP, then you have to have a certain logic in html. Another detail is that…
-
8
votes1
answer50369
viewsHow do I get current Javascript url?
I am using jQuery. How do I get the path from the current and complete URL, I want to assign it to the variable url_atual. $("#id_ativo").change(function(){ $.ajax({ type: "POST", url: url_atual,…
-
8
votes1
answer534
viewsRotate an arrow on a canvas
I need to draw a flow dynamically based on a few user choices. In this flow I want to draw the chosen hypotheses (blue circles with numbers) and the direction between the choices (lines with…
-
8
votes2
answers1853
viewsHow to convert an html string to jQuery object?
How to convert a string HTML in a jQuery object? var objeto = '<div id="minhaDiv"><span id="meuSpan">Span</span></div>';
-
8
votes2
answers3046
viewsjQuery validate submitHandler does not work on firefox
With the following function below, I can send the data via ajax quietly in Chrome, but when testing in Firefox, no error occurs and the data is not sent. $('#form_lista_amiga').validate({ rules : {…
-
8
votes4
answers2145
viewsWhat technique do I use to keep a form field completed or selected after $_POST[]?
I am developing a real estate system and would like to ask how I can keep the data of a form such as inputs, selects and checkbox selected after giving a $_POST on the form. I don’t know how to…
-
8
votes3
answers37193
viewsHow to enable and disable fields by clicking button
I have a page made with bootstrap 3 where I show some fields coming from my BD, now when opening the page I need all fields except a button Iniciar Tarefa are disabled, the button Iniciar Tarefa…
jqueryasked 9 years, 7 months ago adventistapr 5,498 -
8
votes3
answers812
viewsjQuery is still "necessary"?
I have recently wondered about the real need to still use jQuery in new web projects. I know that he was, until recently, the best means (and for many cases the only one) of manipulating HTML…
-
8
votes0
answers263
viewsDevelopment that shows different types of calculations
I need help to assemble a page, program or application that does the following topics of mathematical fundamentals and shows the calculations that the program did. Transposition of Object Rotation…
-
8
votes2
answers154
viewsCreate a vertical Label or Input
I need to create a LABEL or Input so that the typed text is Vertical, as follows: M E U T E X T O Would that be possible in any way? This is required for printing banners in this format.…
-
8
votes3
answers1426
viewsHow to take data from a tag and calculate?
It is possible I get a value within a tag <span></span>? Ex: <span> 5% </span> and calculate a discount at a value? Example: I want to get the value of 5% that is in the tag…
-
8
votes2
answers678
viewsMixing Javascript libraries in a project
I wonder if it is not good practice to load several different Javascript libraries in one application. For example, the project has an X deadline for delivery, but should be done in Angularjs but…
-
8
votes3
answers170
viewsCreate markup with predefined symbols
I didn’t know how to pick a specific title before my doubt, so it was that vague medium anyway. I’ve been trying to do the following for a while: Assuming I have the <p>: <p>Olá, $está…
-
8
votes1
answer4160
viewsSimulate click with jQuery after inserting link via jQuery
I have to open another tab with a link that is returned to from PHP to jQuery. I used window.open but he asks to release the popup and the client doesn’t like it at all. So I thought I’d do, when…
-
8
votes5
answers6529
viewsHow to create buttons to increase/decrease font?
I would like to implement accessibility functions on the website of the company I work with. I was able to implement the contrast button, but I’m having difficulty doing the increase/decrease and…