All Questions
250 questions
0
votes
0
answers
46
views
for loop iterate two time in jquery automatically
I am trying to get data by calling api and put data into table. I found three length of data in object type. Then when I want to show it on table it shows six row but I want three row. When I debugged ...
-1
votes
1
answer
43
views
Iterating Woes on JSON Object in Javascript
Context: I created Flask API to server up jokes, and was creating relatively static frontend for it. I wanted a joke from there API to be on the front end and callable but a button click using a ...
0
votes
0
answers
32
views
Jquery only return the first calculation for every element iteration
I'm new in js please help, the code only return the calculation for the first input in the database. so it prints out the same value for every iteration.
it seems like the loop doesn't break, so it ...
1
vote
2
answers
68
views
How do I apply js code to each foreach element?
I have a php/html code where I iterate over services. And I create modal form by js, but js code is triggered only on the first element iterated over by foreach (php).
What can I do to have js process ...
0
votes
1
answer
576
views
JQuery Add Button once to List Items
I am adding items to a list whenever a user pushes as "Add Item" button. When this happens the list item should be added using JQuery. In addition there is another function that will add a ...
0
votes
0
answers
16
views
jquery iterate through divs correct order wont work?
i am using a plugin to reorder divs. I have this fiddle.
If you reorder the divs the console.log will always show the initalial order. But i like to iterate throught the divs in the order of the page.
...
-2
votes
2
answers
40
views
Reverse iteration in a jQuery Object?
var test_data = {'hr' : [1, 'Hour'], 'min' : [60, 'Minute'], 's' : [3600, 'Second']}
Now while I iterate, I want to get 's' first-
$.each(test_data, function(i, j) {
// I need to get 's' ...
0
votes
1
answer
77
views
Issues running javascript to update HTML and replay a counting animation using CSS keyframes
I am trying to build a simple web app using HTML/CSS and Javascript/JQuery that counts to 10 and animates and displays the numbers one after another. I have the animations working well but I haven't ...
0
votes
3
answers
132
views
How do I make this continue iteration through the FOR loop. Stuck on index 5
I'm building Connect Four per my beginner's project for the course I'm taking. I can't get it to move on past index 5. It seems to still return true that index 5 is undefined, even though after I ...
-1
votes
1
answer
128
views
Stuck in For loop iteration of index 5 using javascript/jQuery
I'm building Connect Four per my beginner's project for the course I'm taking. I can't get it to move on past index 5. It seems to still return true that index 5 is undefined, even though after I ...
0
votes
1
answer
41
views
Iteration through array
I'm having trouble iterating through a for loop to get the index in an array. When the event handler is triggered it goes straight to the last index instead of going to the next index.
var elems = ...
0
votes
1
answer
24
views
Reiterate through classes inside a class inside a div jquery
Suppose I have the following structure:
<div id="table">
<div class="row">
<div class="cell">a</div>
<div class="cell">b</div>
</div>
<...
3
votes
2
answers
352
views
How can I iterate trough a jQuery object and wait for an event?
Could anyone explain how to wait for an event to finish to move forward on the next iteration inside a for loop?
For example:
for ( i=0; i < item.length; i++ ) {
$(video[i]).on('loadeddata', ...
0
votes
1
answer
173
views
Using jQuery gt() and lt() to access range of elements not working correctly
I am trying to push the text of td elements into an array for later use. I am using a click event on a button that is in the last column of a tr element (I marked out an IP Address).
I am attempting ...
1
vote
1
answer
800
views
How to split the process of looping through a huge array?
I have an array with 1000 items that are complex objects.
I need to loop through the array to run some function, when the array is small like 100 products, the performance seems to be alright.
But ...