Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

scrolling down box with most recent feeds

Tags:

jquery

I've taken a look at these three websites:

www.foursquare.com www.untappd.com www.getglue.com

as you can see the main page has a scrolling down most recent activity box. How do I create something like this?

Is this jquery or what?

like image 963
aherlambang Avatar asked Nov 18 '25 00:11

aherlambang


1 Answers

Its done with javascript, you can use jquery to make it easier on yourself. Heres a quick example

http://jsfiddle.net/tpmQj/

$(function(){
    setInterval(function(){
                  $("#wrapper").prepend($("<li>A new item</li>").hide().fadeIn());
    }, 4000); 
});

You could use a timeout, or an interval, coupled with an ajax request, that polls a database and returns new results etc. The basic concept is just appending the new items to the dom tree.

like image 60
Loktar Avatar answered Nov 20 '25 15:11

Loktar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!