Scroll the content at the set intervals(500 ms)?

There are two lines as the following:

<div id="test"> test one jquery is a good library.<br/>
test two php is a good language.</div>

now i want to scroll them one by one (the top line hide the bottom line show.vice versa)and the line shows and hides automatically which time interval is 500 milliseconds . the scroll direction is from bottom to top.

i don’t know how to do.

the following is my code. but I am totally stucked. i don’t know how to write the function.

$(function(){
            $('#test').slideUp('500' function(){
        //how to write
      });
        })&#8203;

Something like a vertical news scroller which you can see in action at this [url=“http://www.jugbit.com/jquery/vticker.php”]demo page?

thank you, if i want to write the code to do myself, how to write the function?

You can look at the plugin code to see how such a thing is written. You’ll find though that there are many different details to consider and resolve.