开发者

Making counter beside the icon like facebook

开发者 https://www.devze.com 2023-02-04 00:17 出处:网络
If you see the \"notifications\" icon on facebook, when you have a new notification, or more, it 开发者_JS百科will display how many(number) besides it with a red background.

If you see the "notifications" icon on facebook, when you have a new notification, or more, it 开发者_JS百科will display how many(number) besides it with a red background.

How can I make something like this?

i want to apply this on http://jsfiddle.net/uckZp/


Facebook uses an API call to query the database to find out and return this number. If you want to do this specifically for facebook then look here http://developers.facebook.com/docs/reference/api/

If you wanted to make something similar for your own site then you will need a database and a load of server side code.

EDIT

How's this - http://jsfiddle.net/uckZp/1/

0

精彩评论

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