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
votes4
answers345
viewsHow to select an option with value comparison?
I need to do "selected='selected'" in a option whose value is what is saved in the variable state recovered in Ajax. How can I do this? $('#cep').on("change", function(){ $.ajax({ url:…
-
3
votes2
answers147
viewsHow to give a "refresh" after updating the new video?
In my view, I have an old video, when I "upload" new video, want to automatically reload a new video after "upload". Follows the code View: <div id="embed_video" class="embed-responsive…
-
3
votes2
answers12233
viewsHow to display/hide fields according to selection?
Follows the code: function exibir_ocultar(val){ var cpf = document.getElementById('cpf'); var nome = document.getElementById('nome'); var cnpj = document.getElementById('cnpj'); var razao =…
-
3
votes1
answer985
viewsDynamic forms on the same page in Jquery and PHP
I’m trying to make a comment portal, and so will have a text input in each POST for people to comment, these POSTS will be on the same page (Facebook style), as well as inputs, which will have to be…
-
3
votes1
answer168
viewsGet all parent elements
I’m in a situation where I have a table that doesn’t have class. Staying like this: <table> <tr> //Pegar aqui <td> //Aqui continua a tabela </td> </tr> <tr>…
-
3
votes2
answers514
viewsHow to return a pure Json (without XML encapsulation) using webservice in c#
I’m with a webservice running locally, which conducts queries directly in a database through a string type parameter. Follow the outcome of the consultation: The second moment I have an application…
-
3
votes1
answer307
viewsCloned Div (jquery) elements only work in Original div
I am using the "cloning" of Divs in jquery, and within them I have other Ivs that when clicking on a button ex.: DIV 1, DIV 2, DIV 3 with javascript shows the content of each div. Only when adding…
-
3
votes1
answer340
viewsHow to view a list from a Json sub-array?
I’m building Ivs dynamically via Javascript. I want to make its content display some information (usernames, emails, etc). The data is coming from the database in Json format. The problem is that it…
-
3
votes1
answer191
viewsSummarize dynamic text in PHP with jquery
I managed to do the function of See More, with a code here from Stackoverflow, but the texts come from the dynamic database, or whatever I do to get each text? Code in php: < div class="box-body"…
-
3
votes2
answers1372
viewsHow to slide between pages horizontally using a fixed menu?
This is my HTML code, and I’m also using CSS with position: fixed; on the menu. Code: <body> <div class="topo"> <img src="img/logo.png" /> <div class="menu"> <ul>…
-
3
votes3
answers665
viewsForm Validation with Submit
In My project I have three formularies being one independent of the other. The form1, form2 e form3. The form1 are mandatory fields to be filled in, and these data will be necessary to generate the…
-
3
votes1
answer697
views -
3
votes1
answer146
viewsIs it possible to add a Function to a json?
Let’s get to the problem. In datatable.js, to display the columns I define as follows: "aoColumns": [ { "mDataProp": "IdProcesso", "sTitle": "Numero" } ] If you need to perform some function: {…
-
3
votes3
answers7377
viewssubmit a form with jQuery by clicking a button outside of the form
I’d like to send a form without clicking the button submit, using the jQuery click event, I tried this way but I did not succeed: $(document).ready(function() { $('.item').click(function() { var id…
jqueryasked 8 years ago Tales Breno 369 -
3
votes1
answer570
viewsHow to feed real-time notifications while logged in?
I’m looking for a system that keeps updating the logged in user to show the messages he receives. Considering that this system will have 250-500 simultaneous users, what is the best way to search…
-
3
votes1
answer861
viewsHow do SELECT not allow selecting an option already selected in another select?
How to make it select don’t allow that the "Leader" option is not duplicate, because in my business rule only one user can be a leader. I thought the following: Assuming I have 3 selects. If I…
-
3
votes1
answer80
viewsHow do I have at most one selected leader in all selects?
How do I make to when I select the Leader option, the javascript do not allow another function to be selected (multiselect)? The scenario is as follows: Each select represents the functions of each…
-
3
votes1
answer3888
viewsHow to send Images via AJAX to php
Good afternoon, I’d like to ask for your help. I’m with a system where I need to send an image of a <input type="file>" for a PHP page via $.ajax() for in, I can upload this image to a…
-
3
votes1
answer81
viewsCode improvement
I am doing a college job, to show the benefit of user interactivity with jquery. The way I did it was: Content is responsible for the part showing the image and doing some onclick function. However,…
-
3
votes1
answer198
viewsGetting whole words with Regexp in Jquery
$.fn.wrapInTag = function(opts) { var tag = opts.tag || 'strong', words = opts.words || [], regex = RegExp(words.join('|'), 'gi'), replacement = '<' + tag + '>$&</' + tag + '>';…
-
3
votes2
answers643
viewsAJAX request with form is updating the page
I am making a simple form to be sent with jQuery Ajax. Data is being sent, but is updating the normal page. I would like to know what I am doing wrong, because when sending the form the page is…
-
3
votes2
answers1198
viewsDynamic tables with Jquery, Javascript and Mysql
Good afternoon friends, I’m having a problem, I’m not able to register all users in BD, only only register the last, how can I solve this problem? Index <form method="post"…
-
3
votes1
answer466
viewsHow to apply html to text found in javascript?
I need to use regex in javascript The situation is this: I need to get the text that is with you inside the element with the text class. After picking up this text, I should analyze whether it…
-
3
votes1
answer860
viewsManipulate DOM at angle 2
I’m passing a web system that has Jquery to Angular 2. I have a button that when clicked it adds two inputs and together with them is created a button to delete these inputs. ( follows the code in…
-
3
votes2
answers646
viewsSort Dropdown with jquery after append
In case the user does not find the desired item in the list of dropdown, it can include a new item, for this I used the function promptof javascript, and then the user enters the name and click on…
-
3
votes2
answers923
viewsPass jQuery variable inside Ajax
I have the following Form: <div class="row" id="importar"> <form id="convidados"> <input type="hidden" value="<?php echo $this->uri->segment(4); ?>" id="id_cliente"…
jqueryasked 7 years, 11 months ago Sr. André Baill 6,946 -
3
votes1
answer327
viewsAnonymous jQuery function passing parameters when calling it
Is it possible to pass parameters in a jQuery function so that I can use it multiple times with multiple elements? I need to leave it with indeterminate elements and pass them as parameters…
-
3
votes1
answer57
viewsProblem getting access time
I’m trying to take the time that the internet remained on the page, however is returned nothing. Main php file: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"…
-
3
votes1
answer64
viewsPass an array of a form to PHP via AJAX
I have this form: jQuery (function($) { AddTableRow = function() { var newRow = $("<tr>"); var cols = ""; cols += '<td><input type="text" name="dados[][nome]" id="dados[][nome]"…
-
3
votes2
answers141
viewsSearch content within tag parameters
I’m creating a search bar where the user type and filter in real time the content of <li>. I have a similar code: HTML <ul id="list-search-filter-map"> <li><a…
-
3
votes1
answer51
viewsJquery keyboard event does not respond
I made this script to move a div by pressing the arrow keys on the keyboard. The right and down key are working perfectly, however, the top and left are not, the code ta the same as the others.…
-
3
votes2
answers609
viewsRandomly position div when loading page
I’m trying to get a div is randomly positioned when loading a page. I thought the following, make the margin-top and margin-left of div were random when loading the page, when clicking again showed…
jqueryasked 7 years, 10 months ago blackbird312 417 -
3
votes2
answers511
viewsHow to activate an event from a class change
I have the following problem, I made navigation arrows for some elements and depending on the active element, I need to change the CSS of another element. In the example below I would need to change…
-
3
votes1
answer70
viewsUsing javascript array within $("tr:contains('"+array+"')")
I have 3 functions, to make the date range filter in a range of 2. So, I have a start date and an end date, and within these two dates he searches a table within his trs and tds such dates that will…
-
3
votes1
answer190
viewsChosen Jquery: remove selection by typing DEL
In the example Chosen - Allow Deselect on Single Selects the possibility to uncheck the selection is implemented. But the same only works with the mouse, IE, with the keyboard has no (not…
-
3
votes1
answer192
viewsJquery/Ajax Duplicating
Good afternoon, I already researched this problem here in the forum and tried some solutions but I do not know what I can do wrong. I have this Function that calls my Modal. function…
-
3
votes1
answer258
viewsCheck Old Jquery’s Winning Game
I created a function to check lines on the horizon, vertical and diagonal, to see which is the winner, but when I call the function it shows winner right at the first click. Can someone help me what…
jqueryasked 7 years, 10 months ago blackbird312 417 -
3
votes2
answers1785
viewsOpen second modal only after closing the first
It seems simple but I’m struggling, I have two modal that has to appear in the home after login of the user, I need to appear one and only after the user closes that first appears the second modal.…
-
3
votes2
answers743
viewsExtract arrays and objects from JSON returned with jQuery
I’m making a request on a web service using jQuery this way: var dados = jQuery( this ).serialize(); jQuery.ajax({ type: "POST", url: "http://meusite.com/test", data: dados, success: function( data…
-
3
votes1
answer1807
viewsText field mask does not work in mobile environment
I used the following code in jQuery to mask the field telefone for example. jQuery(document).ready(function () { $("#telefone").mask("(99)9999.9999"); }); This code works perfectly on the computer,…
-
3
votes2
answers14983
viewsHandle error: "Uncaught Typeerror: Cannot read Property of 'value' Undefined"
Hello, When making an AJAX request, I have the following error: Uncaught TypeError: Cannot read property of 'rede' undefined. Until I understand the reason, I do not have the following value on…
-
3
votes2
answers1865
viewsHow to create a shortcut within a page?
To add a new item in my database there is the button Add, however I would like to add a shortcut for you to perform the same function as the button. For example when the And in any question in the…
-
3
votes1
answer2169
viewsConfirmation message YES/NO
As a PO request, using an attribute to copy the Mobile Phone number to the Whatsapp field, displaying a message to the user, as default is OK and Cancelar, but I would like the name of the buttons…
-
3
votes1
answer1592
viewsChange order of objects in the array by dragging rows from the JS angular table
I have a table and using jquery ( sortable ), I’d like when you drag the line by modifying the html of the table, the order of the array change Example: CAMPO1 CAMPO2 /// DRAG THIS ONE DOWN CAMPO3…
-
3
votes1
answer99
viewsHow to add input dynamically after second table header
I have a problem, I would like to insert inputs dynamically in a table with more than one header, in my script by clicking on the image of + lines are being added after the first header but not in…
-
3
votes2
answers28
viewsAJAX and Weakmaps requests
As I put into practice what I have learned so far about ES2015 with Babel. specifically about Weakmaps, I got into a problem that I don’t know why it happens and with that, I don’t know how to…
-
3
votes3
answers84
viewsPartial selection of a class with jQuery
Hello, I would like to know if it is possible to select a class/element from a partially informed value, for example: <div class="chart-piso c100 p100 orange big"> <span…
-
3
votes2
answers791
viewsjavascript paste command
How do I paste what’s in the clipboard? I did a lot of research, but what I found was just the copy, not the necklace! the only thing I found about necklace, it didn’t work, which was the…
-
3
votes2
answers1060
viewsClose the Bootstrap modal after registering
Colleagues I have a system from which the user when clicking the link Cadastrar Matéria will open the modal below: But I would like to click on Save, modal closes automatically. I tried using the…
-
3
votes2
answers4034
viewsdynamic url in ajax
How do I get Ajax to get the current URL? Here are the values that go to php. If I do so it works jQuery.ajax({ url: "http://localhost/jogoteocratico/consulta.php?dificuldade=1&rodada=1", type:…