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
-
3
votes1
answer160
viewsCreation of dynamic Thumbs
How do websites like Youtube, Netflix and many other sites do this function? Are Thumbs created at the time of Mousemove / mouseenter in the Ogress bar, or have they been created before and the…
-
3
votes4
answers353
viewsuse F2 to click on jquery button
I have the following button on my website: <button onclick='document.location="google.com"'>FINALIZAR</button> How do I make it click when I press F2? I wanted to do this using jquery.…
-
3
votes1
answer5964
viewsHow to print the contents of a page with Bootstrap and Jquery?
I would like to add a Bootstrap button to invoke the printing of a page’s content, I got this example, but it works from a link, see: Example The code places the link at the top of the page, I also…
-
3
votes2
answers1716
viewsDisplays items as selected from a select (HTML)
Good afternoon! I have a database with two tables, products and menus, the two tables are indexed through the Cdcardapio field. I created an html select element that contains all the registered…
-
3
votes2
answers476
viewsFocus with selected text
I have an input on I want it to have Focus and the text is already selected. I’m doing it like this: $(".autofocus").trigger('focus'); The problem is that the text is not selected. Does anyone know…
-
3
votes1
answer384
viewsConcatenate in loop with jQuery
I need to concatenate with jQuery all input values that have classes that start with "item_". I’m using the function below but it didn’t work. $(document).ready(function() {…
-
3
votes1
answer316
viewsJquery Anchor extremely accurate!
I’m using the following code: <?php foreach($sqlPortfolio2 as $dPortfolio2): echo '<li><a href="#guia'.$dPortfolio2['id'].'"…
-
3
votes3
answers112
viewsDOM search for positive name and value
I need to search DOM for name and value. I’m trying to do it like this $('input[name=FLG_SEXOX_CLIEN value="{{ $cliente->FLG_SEXOX_CLIEN }}"]').attr('ckecked').trigger("chosen:updated"); However…
-
3
votes1
answer866
viewsPause or Terminate Youtube Video
Currently I use the following script to pause youtube video: HTML: <span onClick="stopVideo();" class="wmg-close"></span> <div id="player<?= $dAgenda['id'];?>"></div>…
-
3
votes1
answer64
viewsSingle call for Jquery plugins?
I was thinking of something for calling Jquery plugins, I would call all plugins in a single page, but loading them only if they are used. For example: On page X I use Datatables, then:…
-
3
votes2
answers234
viewsAdding Text Box and Writing to Database. (with C#, entityframework 6.1.3)
I am doing a project in Visual Studio 2013, with Entityframework version 6.1.3, MVC 4.5.0.0 and using Viewmodel. I am programming a page that is called payment condition. The creation page will have…
-
3
votes1
answer550
viewsidentify a click outside the div with jquery
Well I know how to identify a click on Cida of an element. I do so: // Fecha Sidenav $("#Close_Sidenav").click(function() { $("#mySidenav").hide(); }); But I need you to $("#mySidenav").hide() run…
-
3
votes1
answer108
viewsInsert HTML string on page, with fade in
Good use the following code in jquery to add a div on the site: $("body").append('<div class="shadow-full"></div>'); But it appears at once, wanted to put an effect to it appear more…
-
3
votes1
answer126
viewsRedeem date-id from a menu
How do I pass the data-id of a menu link to a modal? For example, I have a menu with the link1 - Link2 - link3. For example, clicking on Link2 opens a modal displaying the values of Link2. These…
-
3
votes2
answers3190
viewshow to make an event using the enter key?
I wonder how I do to make a system like the onclick or the click if it’s jQuery. When the user presses the key enter in a form it automatically click the button and send the form with the click. I…
-
3
votes1
answer116
viewsHow to create parent element?
How to create a parent tag within an element with jQuery, for example, having this original structure: <p>texto</p> After function jQuery would look like this: <a href='#'>…
jqueryasked 7 years, 11 months ago Tales Breno 369 -
3
votes3
answers350
viewsSelecting src from an input using ID in Jquery
if(!$("#src-img[src='']")){ }else{ }; I would like to know what is wrong with this if selection, in which case I want, if a value is set in the src attribute, it to execute if, otherwise Else.…
-
3
votes3
answers3091
viewsOrdering select in alfábetica order with jQuery
I need to order a select alphabetically. I tried to use this function I found on the internet function ordenarSelect(){ f$(".slc_Reuniao").html($("option", $(".slc_Reuniao")).sort(function(a,b){…
-
3
votes2
answers104
viewsReceive only number in money field
I’m looking for a td with jQuery. var linhaTr = $("tbody").find("tr:first-child"); var tamanhoTd = linhaTr.find("td:nth-child(2)").text(); and he returns me for example R$ 5,00. But I need to get…
-
3
votes1
answer65
viewsMark checkbox 'brother' with jQuery
I have two checkbox different in the same table column, but both have different names and values. <td align="center"> <input type="checkbox" id="chkSiapeServidor"…
jqueryasked 9 years, 1 month ago feresjorge 445 -
3
votes1
answer341
viewsSort an object’s keys by simulating ORDER BY ASC NAME
In mysql in command SELECT * FROM minha-tabela ORDER BY nome ASC the list will be returned with all results ordered ascendingly based on the column nome, i wonder how I can do the same with a js…
-
3
votes2
answers1633
viewsLoop into function calling itself
I need to create a purposeful loop to check if a variable has reached the desired value, the idea is to create a function that inside it will have a if, which turns out to be cont == 4 in case 4 is…
-
3
votes1
answer275
viewsHow to serialize a datetime displaying in the dd-MM-yyyy hh:mm:ss format
How do I send to View() of my Controller in Json format, the default formatted date dd-MM-yyyy hh:mm:ss? In the transport of data between View and Controller I am using AJAX. public ActionResult…
-
3
votes1
answer40
viewsSwap image or image color in virtual store
Colleagues. I have seen in some virtual stores that there is the feature of changing the colors of the product. How would I make sure that when I click on a certain color, the product is changed…
jqueryasked 7 years, 10 months ago user24136 -
3
votes3
answers512
viewsAdd new field and leave it empty
I am using a jQuery (clone) to copy a line and add it to the element, but if I have this line filled in, it comes exactly like this! I need that when cloning this line, the forms come empty. HTML…
jqueryasked 9 years, 1 month ago Sr. André Baill 6,946 -
3
votes1
answer618
viewsDisplay a <div> when you click the close of the browser window
Does anyone know how I would display a <div> which is hidden when the user clicks the close button on the browser window?
jqueryasked 7 years, 10 months ago Munir Baarini 673 -
3
votes1
answer2079
viewsScroll bottom in click event
I need the page to go down to the footer when clicked on a input. Actually when the user clicks on input and starts typing, the jQuery autocomplete is hidden by the mobile keyboard, so when it is…
-
3
votes1
answer267
viewsHow to repeat content on multiple static pages?
The point is, I have only static files. HTML and am looking for a simple way to create the blocks just once using only the client side. The idea is to respect DRY, there is some way to do this…
-
3
votes1
answer720
viewsFocus on the first enabled form field
This way I activate the Focus in the first field of the form that is not hidden: $('form:first *:input[type!=hidden]:first').focus(); As active the focus in the first field of the form which is not…
-
3
votes1
answer77
viewsFix footer when user scrolls to widget
I’m making a Landing page that has a footer between sections, and when the user scrolls to that footer it should stay fixed at the bottom. I tried to use scrollToFixed but it behaves like a header,…
-
3
votes1
answer64
viewsLink select not working?
Hello folks good afternoon! I have the following code, that I need to form a link at the end, and display the filtered page to the client, but the link always falls on the first ID, which in case is…
-
3
votes3
answers11972
viewsUpdating page after time
I made a page for real-time data sample, and need real-time update after 3 minutes. I tried that code: $(function() { setTimeout(function(){ location.reload(); }, 180000); }); Unproven. I don’t know…
-
3
votes3
answers528
viewsHow to compare indexes of two objects and return what is different?
I would like to compare these two objects and return the index that is different. In this case it is to return the 4 of the second object (will always be different in the second). var arr = { 1 :…
-
3
votes1
answer91
viewsJavascript toggle or if/Else on Adobe Edge Animate
I use Adobe Edge Animate for simple animations at work. I couldn’t get one of them to work and I did a trick. Now I want to know how to do it right. I have a button. When clicked, it should play on…
-
3
votes2
answers220
viewsProblem with access to "Undefined" properties
I have a variable that looks for a input and from that she works getting information from her. The problem I have is that when the input is not there, the script for saying that it cannot access…
-
3
votes1
answer850
viewsremove background from google Chart
Colleagues. I’m using Google Chart in a project, only when installing it in this project, it overlaps the div where it is. How would I put transparent the bottom of the Chart?…
-
3
votes2
answers566
views400 (Bad Request) when sending array to Spring Controller using AJAX
POST http://localhost:7001/app/workflow/execute/ 400 (Bad Request) I’m getting this error when trying to send 2 array’s to my Spring controller, but I’m getting this error, tried some solutions I…
-
3
votes2
answers229
viewsCheck data according to the ready information
I would like to make this form check the following data by clicking "Confirm" and if any of them is correct it will go to the next page. MOCK: $scope.cliente = [{ nome: "nomeedit", senha:…
-
3
votes1
answer150
viewsHow to break line in an XML Feed according to page width?
I have a table with 15 items and I need to break the columns when the total size of the items reaches the total width of the table. Ex.: What’s going on: |--- WIDTH 300px ---| 01 02 03 04 05 06 07…
-
3
votes2
answers634
viewsHow to mark/deselect checkboxes per column using Jquery
Here at the company we are doing a plant management. The apartments/units that have equal end (for example, Apto 1, Apto 11, Apto 21) and so on, are below each other in the construction and for this…
-
3
votes2
answers1059
viewsJSON API Callback
I have a question as to how to filter results from a API, and I wonder if anyone has had this problem before. Let’s say we have to access a API which is on a server other than ours and which returns…
-
3
votes1
answer117
viewsMethod ignoring callback function in jQuery plugin
I am developing a plugin in jQuery and the problem or difficulty is: I created the methods init, show and hide; (function( $ ) $.fn.tooltip = function(method, onClick, onBefore, onAfter) { var…
-
3
votes2
answers5442
viewsChange menu color in page scroll
How do I change the color of a menu by scrolling the page? I’m doing like this $(function() { $(window).on("scroll", function() { if($(window).scrollTop() > 100) {…
-
3
votes2
answers1590
viewsHow to make a progress bar?
I have a page that is loaded via jQuery load. Inside this page is an SQL query that takes on average 8 seconds. I’d like to put some indication that the query is loading, could be a progress bar,…
-
3
votes3
answers135
viewsProblem with Hover event in Firefox
The following code is to use the event Hover in the first image and change the class of the second. But after testing, it did not work in the Firefox browser, working only in Chrome, Safari and…
-
3
votes2
answers517
viewsFunction load() jQuery + Twig
I’m developing a system using PHP, with the idea of owning only one page. How? (I do not know if it is the best solution, I believe it is not) , I developed a side menu that is fixed and the…
-
3
votes2
answers1064
viewsHow to use $(this) + checked?
<input type="radio" name="teste1" value="SIM"> TESTE 1 <input type="radio" name="teste1" value="NÃO"> TESTE 2 $(document).ready(function(){ $("[name='teste1']").click(function () { var…
-
3
votes1
answer226
views5th step using jquery.smartWizard.js
I have the following form menu using jquery.smartWizard.js I need to insert the 5th step and I’m not getting it. How do I insert? Follow below the code of my screen. <!-- Tabs --> <div…
-
3
votes1
answer512
viewsRuler
In some editors we have an orientation rule in which we can perform some configurations such as the spacing between the text and the revelry. I need to produce something like: I currently use a text…
-
3
votes1
answer2688
viewsDropdown with jQuery
I was looking for a dropdown menu with jQuery and found this example: Jsfiddle It opens and closes normal when I click off the menu or on some item of it, except when I open another dropdown. Any…