troubleshooting Question

Jquery $.each Loop multiple rows

Avatar of jporter80
jporter80Flag for United States of America asked on
8 Comments1 Solution596 ViewsLast Modified:
I have jquery displaying data from a JSON file on my website that is displaying tweets from a particular Hashstag from twitter:

The JSON file on my server collects 100 tweets from twitter and caches them and updates every 10 minutes.

Basically want i want to do is only have 4 rows of 25 tweets each.

How can the $.each loop be modified to accomplish this?

here is my code:

<script type="text/javascript">
$(document).ready(function() {
	$.getJSON("json.php",function(data) {
		$.each(data.results, function(i, item) {
    	var listData = "<div class='tweet'><div class='tweet_user'>" + item.from_user + "</div><div class='tweet_text'>" + item.text + "</div></div>";

<div id="tweet_scroll1">
<div id="Tweet"></div>
<div id="tweet_scroll2">
<div id="Tweet2"></div>
<div id="tweet_scroll3">
<div id="Tweet3"></div>
<div id="tweet_scroll4">
<div id="Tweet4"></div>

in the end i will be having each row "tweet_scroll" scroll slowly in opposite directions.
Jon Norman
Information Systems Manager
Join our community to see this answer!
Unlock 1 Answer and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros