[jQuery] timed events

[jQuery] timed events


All,
I am trying to get my head around something I haven't had to try and do before.
Scenario: I have a list of 'traffic lights' on a page, each relating
to a record with unique id in a table.
I want these lights to update every 30 seconds or so, and they will
change colour according to the result.
This update will fire an ajax request - I can do this bit - however,
how should I structure the jquery calls?
Should I
a) give them all a class name and loop over everything with that
class, fetching the id for each and using it in the ajax?
b) create a $(document).ready(function(){ function for each of the
id's and somehow fire them on a timed event? (I can work out how to do
this with a mouseover).
Sorry if this is fairly uncoherent, but I know what I need to achieve,
just not sure which way to start!
Any suggestions gratefully received!
Thanks
--
Duncan I Loxton
duncan.loxton@gmail.com