Most voted "each" questions
14 questions
Sort by count of
-
4
votes1
answer137
viewsWorking Dynamic Selectors (Or Multiple Selectors) in Jquery
I have a Javascript code (Jquery) that takes characters from a DIV and plays this result for another DIV. For the DIV where I take the characters I created a function that adds a class dynamically,…
-
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…
-
2
votes2
answers209
views$. each on a JSON of cities
I am with a Json of cities in the following structure: var cidade = [ { "sigla": "AC", "nome": "Acre", "cidades": [ "Acrelândia", "Assis Brasil", "Brasiléia", "Bujari", "Capixaba", "Cruzeiro do…
-
1
votes2
answers43
viewsProblems with Jquery selectors
My problem is this, I have this code: <script language="javascript"> $(document).ready(function(){ $('#simular').each(function(){ $(this).click(function(){…
-
1
votes3
answers97
viewsEach does not work
I’m looking to replace the tag <a> for <span>. I tried to do it like this, but it doesn’t work: $(document).ready(function() { $('#lista-noticias .box-noticia…
-
1
votes1
answer310
viewsAutomating a function each JS/Jquery
I have 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:…
-
1
votes3
answers46
viewsChanging position of multiple 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…
-
1
votes3
answers100
viewsChange position HTML element with each (or other hint) on page load
I need to access div with id list and change the position of span. It’s like this: <div id="list"> <div class='item'> <span class="AB">conteudo 1</span> <span…
-
0
votes1
answer166
viewsHow to select the value option returned with jQuery?
This variable Uf data. me returns the acronym of the states. Ex...: SC How I make a loop with jQuery to select the date-symbol correlately to the variable Uf data.? <select id="billing:region_id"…
-
0
votes2
answers726
views -
0
votes1
answer366
viewsHow to loop with jquery without duplicates
I wanted to know if you can make a loop inside the other using the function each without duplicating the values Example var cor = ["branco", "preto"]; var exa = ["#FFF" ,"#000"]; $.each(cor,…
-
0
votes2
answers56
viewsHow to get the contents of dynamic Ivs?
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();…
-
0
votes1
answer98
viewssetTimeout with each loop does not work
count = 1; $("a.btns").each(function() { if ($(this).parent("span").attr("id") == "btn_default") { return; } count++; these = $(this); setTimeout(function() { $(these).click(); }, 10000 * count);…
-
-1
votes1
answer58
viewsClick the Actions button of each Row of the table every 2 seconds
I have a table with 4 columns, and the last one a "Send" action button, where it will trigger an email. I need to create a loop where every 2 seconds Jquery clicks the Send from a Row action. After…