Google Groups Home
Help | Sign in
looping through items with a delay
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
pedalpete  
View profile
 More options May 12, 12:28 am
From: pedalpete <p...@zifimusic.com>
Date: Sun, 11 May 2008 21:28:05 -0700 (PDT)
Local: Mon, May 12 2008 12:28 am
Subject: looping through items with a delay
I've got a jquery page with a google map, and I need to retrieve lat
long values for items to be put on the map.

However, I don't want the visitors machine to try and get all the lat
longs at once, as i think that would be an overload (and I think you
are limited to 1 request per second per ip address, but I can't find
that).

Anyway, I seem to have problems looping through the items.
Here's the code i'm trying to use

[code]
 function getLatLong(){
                        var address= $(this).html();
                        alert(address);
                 }

                        $(".address").livequery(function(){
        var LatLong=$(this).id;
                if(LatLong==null){
                setTimeOut(getLatLong,1000);
                }
        });
[/code]

I'm sure this is fairly simple, but I couldn't figure out how to get
first .address, then wait a second, then get second .address, etc,
etc, etc. What I was getting was all .address, then a second pause,
and then all of them again.

Thanks
Pete


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google