开发者

jQuery showing other users on my page

I have a page where each logged in user is shown as a <div> at a custom position, is it possible to show where the user's <div> is for other people.

I was hoping I could do this in (开发者_StackOverflow社区near) real time.

Just a nod in the right direction again would be fine.

Cheers

edit: is there a way to do this without MySQL?


Additionally check out projects like http://www.ape-project.org/ which are ajax push engines. Cometd type implementations may be more what you need if you want to go that direction.


use ajax to check who is connected(thru mysql or anything) and then update your divs with that info. You could pull data every second-minutes whatever you like.


You can send position of user's <div> via php script and store it somewhere(database, file). And for every user get position of all divs from file/database and display them.


is this what you are looking for? http://api.jquery.com/offset/

you wont get arround saving the div position serverside and serving it to everybody then get the result of that via setInterval to update the positions via a js function


You might want to look a node.js, there's a good example of multi-user collaboration here

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜