views:

37

answers:

1

I'm trying to implement a continuous status update feature similar to these sites with ASP.NET MVC + jQuery

http://foursquare.com/

http://hotpotato.com/

Does anyone know where I can find some tutorials/samples?

Cheers

+1  A: 

It looks like foursquare.com renders all status updates from the server, and just uses jQuery to show them. you can do that by hiding all items by default (display: none; in your CSS), and then:

$(function()
{
    setInterval(function() {
        $("#items .item:hidden:last").slideDown('slow');
    }, 3000);
});

if you want it to actually do a lookup from the server, AJAX style, I would look into long polling. it basically allows the server to notify the client when an update happens.

HTH.

dave thieben