Questions tagged as 'each'

1
answer

Working Dynamic Selectors (or Multiple Selectors) in Jquery

I have a Javascript (Jquery) code that takes characters from one DIV and throws this result to another DIV. For the DIV where I get the characters I created a function that adds a class dynamically, being p0, p1, p2, and so on. See: $('.listag...
asked by 18.06.2018 / 02:05
1
answer

How to display a list coming from a Json sub-array?

I'm building divs dynamically via Javascript. I want to make her content display some information (username, emails, etc). The data is coming from the Database in Json format. The problem is that it does not display all participants. Displays...
asked by 04.11.2016 / 18:04
3
answers

Changing position of several DIVS with same selector in Jquery

I have a page that contains several structures with the same selector, such as: <div class="preco"> R$ 69,90 </div> <div class="preco-a-vista"> R$ 50,00 </div> As I mentioned, the above structure repeats several tim...
asked by 25.06.2018 / 03:17
3
answers

Each does not work

I want to give a replace in the tag <a> by <span> . I tried to do this, but it does not work: $(document).ready(function() { $('#lista-noticias .box-noticia .conteudo-noticia').each(function() { alert...
asked by 10.05.2016 / 16:35
1
answer

Automating a JS / Jquery function

I'm having a problem automating a function in JS / Jquery. I have the following code: $('.tab-pane').each(function(index, el) { tipo = $(this).attr('id'); $("#owl-carousel-" + tipo).owlCarousel({ loop: t...
asked by 07.12.2016 / 11:48
2
answers

Problems with Jquery selectors

My problem is this, I have this code: <script language="javascript"> $(document).ready(function(){ $('#simular').each(function(){ $(this).click(function(){ $("input[name...
asked by 13.04.2016 / 03:57
1
answer

How to select the value option returned with jQuery?

This variable data.uf returns me the acronym of the states. Ex ...: SC How do I loop with jQuery to select the data-acronym corresponding to the variable data.uf ? <select id="billing:region_id" name="billing[region_id]"> &...
asked by 12.04.2016 / 17:36
2
answers

How to get the contents of the dynamic divs?

I have the following code, which is added dynamically: var m = 0; $$("#add_medicamento").click(function(){ m++; var medicamento = $$("#select_medicamento").val(); var qnt = $$("#quantidade").val(); $$("#lista_medicamentos").append('<li clas...
asked by 30.06.2017 / 22:06
2
answers

Generate array with table contents with jquery

Hello I'm trying to retrieve the elements of a table and move to a jquery array that will be used in ajax I create the td dynamically: var newRow = $("<tr>"); var cols = ""; cols += '<td class="tdProduct...
asked by 17.04.2016 / 01:00
1
answer

setTimeout with each loop does not work [duplicate]

count = 1; $("a.btns").each(function() { if ($(this).parent("span").attr("id") == "btn_default") { return; } count++; these = $(this); setTimeout(function() { $(these).click(); }, 10000 * count); }); The problem should...
asked by 03.02.2018 / 22:44