Moving front page (cursebird or foursquare)
Posted
by
Dan Samuels
on Stack Overflow
See other posts from Stack Overflow
or by Dan Samuels
Published on 2010-12-09T11:18:56Z
Indexed on
2011/01/02
6:54 UTC
Read the original article
Hit count: 268
Ok so I'll be honest, I have a good amount of experience with php/mysql, I've just started learning jQuery and I've done very little, but some with ajax. So using the terms ajax/jquery interchangeably are a bit confusing to me. Anyway as the title suggest I have a website with 5 items, and I want them to move (meaning, if a more recent one is entered, remove the last item, and put the new one on top), they are 5 of the most recent items in the database table, now I've coded jquery as a test so it fades out the last one, the whole thing moves down, makes room at the top, and fades in a new one. However, it's a test and has 0 interaction with the database, the one that fades in is just in a hidden div. So the jQuery part is taken care of.
So I'm unsure how to go about this, I was thinking maybe have ajax check a website off the page that has those 5 items in raw format, and if they change then to refresh?
Not looking for a "plz code 4 me" answer, just the concept of how it would work, or some links to get off to the right start.
edit - Also, the 5 items are ranked, so if I click item 3 I need it to move above item 2 refreshlessly, so this causes a whole other issue I assume.
© Stack Overflow or respective owner