I want to make a site use wp, and I want add a scroll news like Top Tweets in twitter homepage. when the custom post a new replys in every part of my page, the new topics will disply in this scroll news part. they all come from latest 10 items of database. How to do that? Thanks
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- Carriage Return (ASCII chr 13) is missing from tex
- PHP Recursively File Folder Scan Sorted by Modific
- How to fix IE ClearType + jQuery opacity problem i
Using Jquery you can make a div slide in and slide out of view. http://docs.jquery.com/UI/Effects/Slide#overview.
Then you give each div a unique id each containing a comment from your database. Initialize div 0,1,2 as visible and 3-9 as hidden. Here the javascript structure:
THis updates every second.. which is a bit fast ... so you should set it to something like 7000 milliseconds. demo