Jquery - polling
I'm completely new to js and jquery. I looked at mootools, prototype, scriptalicious etc - but I prefer jquery cause it feels a bit like xpath to me and something semi familiar.
What I want to do is quite simple (I hope). I have a php script that spits out a count of the number of messages for a user (determined by session cookie) that are waiting to be read.
I would like to poll this script every X seconds, and update a div with the contents. If the number increases, I'd also like to run some effect on the div to alert the user.
However, first steps first - how do I poll in jquery?