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
-
6
votes3
answers943
viewsHow to sort DOM elements by jQuery?
Suppose I have the following list: <ul> <li>1</li> <li>2</li> <li>3</li> <li>4</li> </ul> I want all elements of even numbers to be…
jqueryasked 9 years, 3 months ago Wallace Maxters 102,340 -
6
votes3
answers2663
viewsHow to copy to clipboard without using flash?
google Chrome is displaying a message from "This site uses plug-in (Adobe Flash Player) that will soon be no longer compatible". Is there any way to do it without Flash? How? And something that…
-
6
votes1
answer246
viewsProgress bar for slide jcarousel
// Carousel $(function(){ $(".peq-carousel").jCarouselLite({ bntNext: '.next', bntPrev: '.prev', visible: 7, auto: 3000, speed: 800, vertical: true }); }); // Barra Progresso function startbar(){…
-
6
votes3
answers242
viewsShow list of 6 in 6 items
I have a menu listing with the following HTML: .menu ul { height: 115px; width: 960x; } .menu li { font: 900 22px/22px"open sans"; color: #16232e; width: 160px; text-align: center; text-transform:…
jqueryasked 9 years, 8 months ago Felipe Viero Goulart 3,693 -
6
votes2
answers4741
viewsHow to read a JSON file without a server?
I’m developing a simple static website with html, css, and javascript hosted in Dropbox, using javascript with framework Jquery and trying to read a JSON file. var jqxhr = $.getJSON( "example.json",…
-
6
votes3
answers4981
viewsHow to customize input file?
I need to customize a file type input, but all the examples I found seem funny and does not work with Multiple, rs You need to look like that: There is a way to do only with CSS?…
-
6
votes1
answer977
viewsInsert data into an External Json
How to insert data into an external Json file: var json = { caminho: "img/minhaIMG.png", descricao: "minha descricão" } How can I enter new data into this json file? In my case, I would use it as a…
-
6
votes1
answer355
viewsDetect when user presses ENTER
I have a jQuery code that detects when the key ENTER is pressed, but the event is also called when I use Shift + ENTER, for example. How do I detect only the ENTER? The intention is to send the form…
jqueryasked 8 years, 12 months ago Eduardo Silva 3,449 -
6
votes1
answer637
viewsHow to link a specific div from another PHP page
I have a one page site, where I have an external page with a menu, and the same needs to link the DIVS of my home (one page). Example: On my external page, when clicking on the Videos menu, I will…
-
6
votes4
answers4991
viewsDatatable does not order correctly
I’m using the plugin datatables to paginate results in a table. The problem is that the first column has 3 dates: 26/11/2015 19/11/2015 03/12/2015 I need to order the results of dataTables based on…
-
6
votes1
answer54
viewsIdentify a specific part of the screen
Is it possible for me to identify a specific part of the screen with Jquery’s javascript? For example when going through height y it perform a function for me? I imagine something like: var…
-
6
votes1
answer40
viewsIs there a problem using HTML 5 attributes instead of jQuery or Javascript?
Is there some security issue or something like using only attributes, like required in inputs, among others, instead of jQuery? Or it’s just some option to use jQuery to customize the message only?…
-
6
votes1
answer214
viewsUndo click of jQuery parent element
As I can prevent the click of the #b it runs the click of the #link, I would like it to alert only "b" $("#link").on('click',function(){ alert('link') }); $("#b").on('click',function(){ alert('b')…
-
6
votes3
answers1209
viewsGet the name of the Image in the URL
I need to get the name of the image in the url. /data/data/com.intel.appx.IZICondominios.xwalk15/files/_pictures/picture_006.jpg I need you to come back: picture_006.jpg The URL template is not…
-
6
votes2
answers190
viewsClosed JS open panel
I have the following panel: $(document).on('click', '.panel-heading', function(e){ var $this = $(this); if(!$this.hasClass('panel-collapsed')) {…
-
6
votes2
answers2609
viewsRun function only once after site loading
A friend passed me a script of a box that opens when someone enters the site, however, when updating the page it appears again. You could help me? Below the code: function timer() {…
-
6
votes2
answers2640
viewsSum days on input date
I have a input date type, I would like to add to it 7 days and put this value in another input also date type, I tried to do so: <script> $('#txtSolicitacao').on('blur', function(){ data =…
-
6
votes1
answer728
viewsAjax in different project
I have a project in Asp.Net MVC with the following method: public ActionResult ObterCursos() { List<curso> cursos = new List<curso>(); curso curso_ = new curso(); curso_.Nome =…
-
6
votes4
answers1343
viewsPlugin bootstrap-material-datetimepicker disable days of the week
I’m using the Timepicker plugin called bootstrap-material-datetimepicker: (https://github.com/T00rk/bootstrap-material-datetimepicker). I’d like to be able to shut down some days of the week, or…
-
6
votes2
answers8910
viewsPopulating selects of cities and states with AJAX (PHP and jQuery Mobile)
I’m riding a webapp with the Jquery Mobile, PHP and AJAX framework. In this app I have a form with selects of ESTADO and CIDADE, was made an AJAX that when selects the ESTADO, carries the CIDADES…
-
6
votes1
answer7000
viewsTreat event when closing browser
I am having problems regarding this event handling when closing the browser using javascript. I did some research and found an idea through onbeforeunload: <script> window.onbeforeunload =…
-
6
votes2
answers188
viewsWhat is the difference between the following ways of using the jQuery ON and OFF methods
1 - I used to use this way: $(document).off('evento', 'elemento', nomeFuncao); $(document).on('evento', 'elemento', nomeFuncao); 2 - But recently I used it and it worked the same way.…
-
6
votes3
answers5917
viewsCheck whether the values of an array are all the same or all different
I wanted some function that returned TRUE when all values within an array were equal or if all were different, and returned FALSE if they were not all the same and not all different. In case you…
-
6
votes3
answers284
viewsDiv with fixed position on the screen within the boundaries of another div
I need a div to be fixed on the screen, IE, descend as I visualize the rest of the page, but the problem with the position:fixed is that it takes the element of page flow. I want this div to be…
-
6
votes2
answers723
viewsCount black pixels from a region of the image
I have the following question: I have a script that can select the coordinates of an area of an image: https://jsfiddle.net/zauk0qLk/2/ Whereas I have an image binária (black and white), how do I…
-
6
votes1
answer1277
viewsoptional mask caractére with Jquery maskedInput does not work
In a form that I am developing, one of the fields that the user needs to fill is cellular, and as the cellular of some regions of Brazil have 9 digits I am using the library jQuery Maskedinput to…
-
6
votes3
answers3450
viewsPreloader while the site loads
I’m making a hotsite, it’s one page, and it’s a little heavy, with some pictures. I wanted to do a preloader with %, before loading all the content. With: $(window).on('load', function() {…
-
6
votes4
answers790
viewscapture value of < option > with jQuery
You guys, I got this select html. <select name='busca' onChange='link()'> <option value="1">OP1</option> <option value="2">OP2</option> <option…
-
6
votes4
answers231
viewsJquery find in tree
I have the following context: <div class='pai' id='item'> <div class='form'> <div class='filho' id='item1'> <div class='filho' id='item3'> </div> </div> <div…
-
6
votes2
answers1593
viewsWhat are the differences between normal jQuery and slim versions?
In the latest version of jQuery, 3.0, it was announced the version slim. What is the difference of this version slim for the regular jQuery 3.0 version?
jqueryasked 7 years, 11 months ago Munir Baarini 673 -
6
votes2
answers1025
viewsHow to disable/enable button(button) when input file is empty/selected?
So I have a simple image upload form that I leave disabled button. Wanted that when I select a photo or file in the input file, the button enable! <div id="botoes" class="clearfix"> <button…
-
6
votes1
answer469
viewsHow to change this JSON object?
I’ve had the following problem for a few days: I’m using Cakephp and sending JSON to a datagrid of Easyui as follows: $rows = $this->Produto->find('all', array('fields' => array( 'id',…
-
6
votes2
answers875
viewsHow to load Facebook content?
How does Facebook do this with loading your page? It uploads content gradually and not all at once like most websites, Stackoverflow is an example that loads once and for all. What do you call this…
-
6
votes1
answer1262
viewsHow to change filename for download?
I am generating a PDF file and use HTML5 to display it on the screen: $("#conteudo-pdf").append('<object data="' + meuData + '" type="application/pdf" style="width: 100%; height:…
-
6
votes1
answer1247
viewsHow to fill a star rating?
How to fill the stars of a "star rating". The calculation is apparently working. Giving an "echo" in the variable $calc the result is displayed. Example, if the note is 3.3, it must fill 3 stars and…
-
6
votes1
answer395
viewsHow to view all JS code requested by an iframe?
I want to exhibit a iframe with an external page and then show in a textarea all JS code requested by iframe in question. I have two problems: the first is how to know all the requisitions that the…
-
6
votes1
answer4275
viewsWhat is the difference between using focusin/focusout and Focus/Blur?
Using jQuery to focus on a specific element raised the doubt: What’s the difference between using focusin() in relation to focus()? And focusout() in relation to the blur()? Is there any specific…
-
6
votes2
answers4267
viewsAssign a value to my td inside a table with jQuery
I cannot assign a value to my td within a table, it contains id dynamic as in the example below: <table class="table table-condensed table-hover" id="tabelaDependentes"> <caption>Lista…
-
6
votes1
answer2324
viewsValidate maximum size of an attachment
Good afternoon, you guys, I need to validate the maximum size of an attachment but my code is not working, can help me? Follow the code below: HTML: @using (Html.BeginForm("AdicionarAnexo", "Turma",…
-
6
votes3
answers1463
viewsPlace images in a div with jquery
How can I place certain images in a div using jquery by clicking the button? Follows the html: <div> <button id="btn2015" class="btn">2015</button> <button id="btn2014"…
-
6
votes3
answers72
viewsPage does Submit even with validation error
Hello, I’m having trouble with a page because it’s doing Submit even when validation returns false. $("#botao1").click(function() { $.ajax({ url : 'adicionadaIdeia', type : 'POST', async : false,…
-
6
votes1
answer69
viewsDifferent color layout in Textbox (Safari and Chrome)
Safari is fading colors inside that are not @Html.Comboboxfor, as I do not fade into the textbox? I’m using CSS and Jquery, Follow the photo Select does not fade in Safari: @Html.DropDownListFor(m…
-
6
votes0
answers407
viewsAdd or decrease columns and rows in the table
I have a table where I want to add or decrease new rows and columns, through the button click event, I tried this way, as the code below, but it’s not working very well: This example of how it…
-
6
votes4
answers124
viewsHelp in refactoring jquery code
$(".img1").mouseenter(function() { $(this).css('box-shadow', "inset 0 0 20px black"); }); $(".img1").mouseout(function(){ $(this).css('box-shadow', ""); }); $(".img2").mouseenter(function() {…
jqueryasked 8 years, 11 months ago João Pedro 97 -
6
votes1
answer552
viewsTake autocomplete return and put in different inputs
I have the following script <script type="text/javascript"> $().ready(function() { $("#course").autocomplete("teste1.php", { width: 260, matchContains: true, selectFirst: false }); });…
-
6
votes5
answers31061
viewsFormat Float value as currency using Jquery
I have a function that sums the values of a line, I would like to know if it is possible to put the value as currency like this: R$ 16,00 It’s coming out this way R$ 16.00 But I wouldn’t want to use…
jqueryasked 8 years, 11 months ago Macario1983 1,335 -
6
votes1
answer6117
viewsTake elements by class/id with pure Javascript
In jQuery, we use quotes to pick up $('div.oi'). What about pure Javascript? Piss if we use without quotation marks is different. If we change the css for example: With jQuery:…
-
6
votes2
answers7016
viewsremove element css
I wanted to know how I can via jquery remove all css styles from a certain html element. Example: html <h1 class="titulo">Título</h1> css .titulo{ padding: 5px; color: #424255;…
-
6
votes4
answers877
viewsHow to search for an element with the same class depending on the number of children?
My scenario is this, I have two ul with li. As uls have the same class, but I wanted to manipulate only one of them, in this case, the one that has only one li as a daughter. Example:…
-
6
votes2
answers162
viewsHow to count state changes in fields with a certain class within a function?
How do I count how many changes occur in all fields of a form with a certain class? Update: What I want to know is if there has been any change in each field (one), and not how many times there was…