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
answer53
viewsReversing the jquery effect
I am learning Jquery. And I made the following code $(document).ready(function(){ $('html').click(function(){ $('.box').css("background-color", "#666"); $('.box').animate({"width":"400px"}, 1000);…
jqueryasked 9 years, 7 months ago ivan veloso 2,900 -
3
votes2
answers2395
viewsAdd <option> to <select> with jQuery via $.post’s callback
I’m making a select that will have some users and when selecting a user will send a request $.post to get all records related to the selected user. After returning the related entries, the jQuery…
-
3
votes1
answer624
viewsReload page with MVC
I made a function in the model and the call in the controller. Then, I go to jquery and the write command in the BD is successfully executed. It turns out, when I finish recording, the screen…
-
3
votes1
answer569
viewsHow to iterate over a JSON file to appear in the Auto Complete listing?
I’m making an autocomplete, via AJAX, that enters the web service, "Search in the Database" and returns me a String in the format JSON. I have to transform the JSON below in a list to iterate on it.…
-
3
votes2
answers495
viewsHow to use Wordpress Media Upload on multiple buttons?
Follow the HTML code of the button and text field: <div class="meta-container"> <div class="label col-2 left"> <label class="squeeze-label">Imagem Logo:</label> </div>…
-
3
votes1
answer218
viewsDifference between Contents() and html() methods
I needed to get the contents of a iframe (which was in the same domain on the same page) with html(), but to no avail. Then I saw that there was a method called contents(), and worked out using it.…
-
3
votes2
answers1545
viewsget the date in fullcalendar’s select event
I’d like to know how to get the value of data by doing the select of a day in fullcalendar select: function(start, end, allDay) { start = $.fullCalendar.formatDate(start, 'yyyy-MM-dd'); alert('Valor…
-
3
votes1
answer506
viewsWhen you click on the smaller div, open the larger div
I have the following layout. The larger square shows one of the smaller squares, only in larger size. That is, if I click on the second smallest square, it has to show on the largest square. Is…
jqueryasked 9 years, 7 months ago Felipe Viero Goulart 3,693 -
3
votes1
answer1042
viewsChange background according to image
I’m needing to create an effect on my slideshow that for each image, the background of div color change according to the predominant color of the same. I searched the internet for a plugin that does…
-
3
votes2
answers2044
viewsEnable button event by pressing key on keyboard
I am developing a calculator, and I need when the user presses the key enter passed on as if he were pressing the key igual. The calculator is inside a form, then I use this code to disable the Post…
-
3
votes2
answers328
viewsHow to swap a string with jQuery?
I need to capture a string, take a piece of it and exchange this piece for another text. <img src="/kit_150x150-12por-150x150.png"> I need to get the piece 150x150.png of src and trade for…
jqueryasked 9 years, 7 months ago Marcos Vinicius 7,188 -
3
votes0
answers51
viewsChange CSS element depending on the SELECT option using jQuery
I’m having a hard time making a certain interactivity on my site. For example, there is a select in HTML with 3 options, and when the user selects certain option, there would be a change in the CSS…
-
3
votes1
answer347
viewsWindow.onbeforeunload in Firefox
When using "window.onbeforeunload" in firefox, it returns only a generic message as per the image below: Is there any way I can customize this message in a "modal" in firefox?…
jqueryasked 9 years, 7 months ago Eduardo Nobre 356 -
3
votes1
answer6986
viewsHow to remove dynamically generated table row with Jquery?
I would like one of the automatically generated columns in the table to have a function to delete the row, but the on click is not working. How should I do it ? $(document).ready(function(){…
-
3
votes1
answer652
viewsReturn in each getJSON - Jquery
I would like to know the following how do I give Return in a function created by me, in a situation below. Because it always returns Undefined the object, but when I give an alert it returns the…
-
3
votes2
answers103
viewsjQuery unbind to everything, when window size <= 800
I would like all actions programmed with Javascript to be effective when the $(window).width() <= 800 to avoid conflicts between Mobile layout and desktop. But the truth is that it runs out of…
-
3
votes1
answer354
viewsjQuery, stop performing functions depending on window size, also in resize
I’m working on a website that calls external JS files. The problem is that when you would like some functions to stop running on desktop when $(window).width() < 800 and vice versa: Link to…
-
3
votes1
answer13858
viewsjQuery: How to check if an element is hidden?
How to check if an element is visible or hidden in jQuery? For example, an element can be hidden using .hide(), visible using .show() or switch between hidden/visible with .toggle().…
-
3
votes1
answer524
viewsCall function without needing to instantiate the plugin again
I’m doing a drag and drop plugin with a colleague, but we’re having a problem. When we instantiate the plugin it runs normally, but if we want to call some function of this plugin in the variable in…
-
3
votes1
answer205
viewsJquery cancel ajax request
How can I cancelar uma solicitação do Ajax that has not yet received the answer using Jquery.
-
3
votes2
answers8493
viewsHow to add value to variable in jQuery?
I have a variable x that is written on the screen with initial value 0; I want every click on a button (be input or button same) in HTML file, the value of this variable is added 1; When added, I…
-
3
votes1
answer824
viewsSend multiple values in an input to PHP, using jQuery AJAX
I have a script to insert several items in a list of a form, using Ajax. For each element inserted in this list, a next one must be added. After inserting X elements, it should take all values and…
-
3
votes1
answer1085
viewsCalling PHP method with ajax
I have a code that does a validation in javascript, and I would like it to be validated as true, change a table of the database. I thought to use ajax, so as soon as validate as true, call a method…
-
3
votes1
answer5329
viewsCalling PHP variable inside a Javascript function
Inside the Nivoslider . js, I have the following line calling the two slider arrows (left and right): slider.append('<div class="nivo-directionNav"><a class="nivo-prevNav"><img…
-
3
votes2
answers1413
viewsCalculate the size of the div
I’m working on a simple "Divs slider" script! There’s only one problem, when you start moving left and right it cuts a piece of Divs, I need it to move exactly in a way that it doesn’t cut the Divs…
-
3
votes2
answers797
viewsHow to take bar of a modal
Hello, how do I get this gray bar off the modal ?? $(function() { var dialog, form, dialog = $( "#painel_fazer_upload" ).dialog ({ autoOpen: false, height: 520, width: 500, modal: true, }); $(…
-
3
votes2
answers1336
viewsHow to transform input value into string
How do I transform the value of an input into a string, including if the user types HTML tags, with Javascript or jQuery. <div class="val-input" contenteditable="true"></div>…
-
3
votes1
answer265
viewsBootstrap 3: Collapse on Hover and fixed on click
I would like to know how to make the Collapse of Bootstrap 3 open in the Hover and if it is clicked it is fixed (Do not close) and only close if another Collapse is clicked (And this other Collapse…
-
3
votes1
answer2029
viewsImplement navigation with buttons: [first] [next] [previous] [last]
Explanation: I have an HTML+jQuery table and I have an enumerated pagination that is functional, but I would like to add an additional navigation to it. Question: I would like to add an…
-
3
votes3
answers931
viewsHow to check the empty values of a dynamic form?
How to use Jquery to attack the attribute name of all inputs and check if there is value Current Code Form: ... <input type="text" name="nome[]" value=""> <input type="text" name="nome[]"…
-
3
votes1
answer874
viewsHow to translate jqGrid to 'en'?
I downloaded jqGrid version 4.8.2 and when trying to change the language from 'en' to 'en' always displayed the message 'Undefined'. I copied the file with the information to 'en' and changed all…
-
3
votes2
answers664
viewsHow to share functions between javascript files?
I have two files JavaScript. arquivo1.js function teste() { alert("fui chamado!"); } In the arquivo2.js i would like to have access to function teste() of arquivo1.js without having to make the…
-
3
votes2
answers903
viewsSearch through ID and attribute
How to get a div for example through your ID and Attribute in specific like this: <div id="Y" data-id="X"></div> that is, a code that picks up a DIV with id=Y and data-id=X…
-
3
votes1
answer486
viewsHow to get Json by Ajax in . html?
Suppose I have a file .html I just created in the notepad with a code Ajax where I want to get the data generated by this application. I made a code here, and when I put one breakpoint in the…
-
3
votes1
answer870
viewsJquery How to Monitor Exchange of Values?
I have a radio button: <input type="radio" value="1" id="monitor" style="display:none;"> Here I change the value of it, and I would like an alarm to be triggered: $(function(){…
-
3
votes2
answers3812
viewsSend form data via GET to server (without updating page)
I have this form and would like to give a GET for variables with their value when clicking the button, without refreshing the page because I have other forms on the same page, it is possible with…
-
3
votes1
answer66
viewsTransfer value from C# to jQuery
Well, I have a job in ASP.NET here where I can upload music to a folder on the computer and already have a function on C# to search the address of the archive. Anyway, I wanted to use this path in a…
-
3
votes2
answers488
viewsjQuery.preventDefault(), jQuery.stopPropagation() and jquery.Stopimmediatepropagation()... no jQuery!
There is an implementation crossbrowser for the methods jQuery.Event.preventDefault(), jQuery.Event.stopPropagation() and jQuery.Event.stopImmediatePropagation() that does not require jQuery? I have…
-
3
votes3
answers276
viewsWhy does it always return null?
I created this fiddle as a test. I have this li within a variable and I intend to add the class c2 to that very same li var linha = '<li id= "id1" class="c1"> ' + '<div…
-
3
votes2
answers1364
viewsForm submission and out-of-form array via post
I have the following problem: I need to send via post the data of a form together with the data of an html table to which I mount a array javascript. Unfortunately, I have no idea how to proceed in…
-
3
votes1
answer283
viewsJavascript only works if placed directly on the page
I have some functions and they only work if they’re put in the same file where the code is that will use them. Break up with: <script type="text/javascript" src="js/funcoes.js"></script>…
-
3
votes2
answers37
viewsSet a global error for Ajax requests
I have several Ajax requests, and did not set an error option for any of them. Is there any way to set a global error for all requests? Similarly there is the sucess: {... but globally without me…
-
3
votes1
answer1814
viewsWhy does my Jquery code not work on elements loaded with . load(), how to load them?
What is the correct way to load my jQuery scripts together with . load(). I did this way but wanted another solution that works with all the updates that occur with the form, as remove of products,…
-
3
votes2
answers3059
viewsConsult CPF in the IRS
I would like to somehow consult the name of the person through the CPF on the website of the recipe. There are apps on android that just put the CPF and it brings the name and the cadastral…
-
3
votes3
answers644
viewsData Datepicker - Processing
Sirs: The date I have on datepicker is in format dd/mm/yy, however, the date in the database is yy-mm-dd (date field). How do I make datepicker to display the default BR date and when it comes via…
-
3
votes1
answer1598
viewsCustom Like and Share Button Counter for Social Networks Twitter and Facebook
How to get the total number of likes and shares of a URL, on platforms Twitter and Facebook? There are several websites where you can see buttons share/partilhar/compartilhar custom Facebook and…
-
3
votes1
answer5739
viewsJavascript/Jquery copy-paste command (Ctrl + c)
I simply want the Javascript command that copies and pastes, regardless of whether it works on all browsers. There is a similar question here. But it requires it to work on all browsers.…
-
3
votes0
answers132
viewsPopup with a magnifying glass
I have a page with a combo that allows multiple selections of your items. If the user selects only one item, when closing the combo a text is displayed about the selected item. if, however, the user…
-
3
votes2
answers578
viewsGet the optgroup label and option value and display in a div with Jquery
I have the following code: <select> <optgroup label="fruta"> <option value="banana">banana</option> <option value="uva">uva</option> </optgroup>…
-
3
votes1
answer72
viewsSort by a specific value
I’m using the plugin Datatables and in a column I possess the following structure JSFIDDLE And by default the plugin creates the default sort form that I don’t know which rule you obey, I would like…