Questions tagged as 'jquery'

3
answers

How do I assign "selected" to a dynamic option?

I'm populating a SELECT from a JSON received via AJAX as follows: $.each(parsedData, function(i, produto) { $('select#produtos').append( $('<option></option>').val(produto.cod_produto).html(produto....
asked by 05.07.2016 / 20:12
2
answers

Should I validate data in javascript and php? [duplicate]

I have a file that sends some data to another page with ajax . These data are mostly numbers, and are not stored anywhere. I just get some data in inputs and send it to the file php with ajax , and then return these calcul...
asked by 09.07.2016 / 14:15
3
answers

Display different contents when you select one of the buttons

How can I make% change with a push of a button? in case I have 3 buttons, the first one will cause the first div to be displayed, the second to show the second div and the third to make the third div appear. Something similar to...
asked by 10.11.2016 / 19:57
2
answers

removeClass with jQuery

I use the following code in jQuery to remove a class from a TR of a table. $("tr").removeClass('text-white'); It works fine, but it's removing the tr from all tables, I want to know how to remove only from the class="dados"...
asked by 03.11.2016 / 13:14
2
answers

Display Div with specific content when clicking on link

Good morning, I'm creating this topic because I performed a search in the forum and found this solution here. Opening a < div > when you click on a < a >? link But I need a more specific solution. I am developing a questio...
asked by 09.11.2016 / 16:26
1
answer

Error comparing two strings with float value

Good afternoon! I am trying to compare numbers with Jquery, they are values with decimals or not. when the value goes up to 999 everything works perfectly, but above that it does not work as it should. Example: value_mo_contract = 510.00...
asked by 20.03.2017 / 18:07
1
answer

Problems in nth child

I have the code below, it's working perfectly, the only problem is that if I add one more or a few li it changes its formatting. I wish it would stay the same now, except regardless of how many LIs exist. I would like the background to be the sa...
asked by 22.06.2016 / 16:44
1
answer

Sort a list ul by the attribute "value" of the li?

Speak, all right? So I have a problem ... I have a "sort by" button, in this case, higher price and lower price. What I need to do is sort the elements of a <li> list by its value attribute. For example: <li value="200">...
asked by 04.06.2016 / 03:59
1
answer

Error fetching JSON from a text - JQUERY

I'm retrieving a json from a text, however, the following error occurs: XMLHttpRequest cannot load http://www.vagas.com.br/vagas/feeds.js?q=engenheiro. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin...
asked by 07.06.2016 / 20:19
2
answers

While Ajax JQuery

I have the following code: $.ajax({ type:"post", url:"../connect/post/infoClienteTask.php", data:'infoClienteTask='+fantasy, success:function(responseData){ console.log(responseData);...
asked by 24.11.2016 / 12:04