All ready to cut and paste!
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
<!DOCTYPE html> <head> <title>News Ticker</title> <script src="http://code.jquery.com/jquery-latest.js"></script> <script> $(function() { var ticker = function() { setTimeout(function(){ $('#ticker li:first').animate( {marginTop: '-120px'}, 800, function() { $(this).detach().appendTo('ul#ticker').removeAttr('style'); }); ticker(); }, 2000); //adjust seconds here }; ticker(); }); </script> </head> <body> <div id="wrap"> <div id="head" class="block"></div> <div id="content"> <div id="info" class="block"> <ul id="ticker"> <li> <span>Titolo Lorem Ipsum 1</span> <a href="#"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec suscipit, ante id porttitor faucibus, odio eros pellentesque sapien, at consectetur mi nibh at massa. </a> </li> <li> <span>Titolo Lorem Ipsum 2</span> <a href="#"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec suscipit, ante id porttitor faucibus, odio eros pellentesque sapien, at consectetur mi nibh at massa. </a> </li> <li> <span>Titolo Lorem Ipsum 3</span> <a href="#"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec suscipit, ante id porttitor faucibus, odio eros pellentesque sapien, at consectetur mi nibh at massa. </a> </li> <li> <span>Titolo Lorem Ipsum 4</span> <a href="#"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec suscipit, ante id porttitor faucibus, odio eros pellentesque sapien, at consectetur mi nibh at massa. </a> </li> <li> <span>Titolo Lorem Ipsum 5</span> <a href="#"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec suscipit, ante id porttitor faucibus, odio eros pellentesque sapien, at consectetur mi nibh at massa. </a> </li> </ul> </div> </div> </div> </body> </html> <style type="text/css"> * { margin: 0; padding: 0; } body { background-color: #FAFAFA; color: #666; font: 13px Tahoma; cursor: default; } body a { text-decoration: none; outline: none; color: #06C; } div#info ul li { float: left; } ul#ticker { width: 960px; height: 41px; overflow: hidden; } ul#ticker li { width: 960px; height: 41px; border-bottom: 1px dashed #ccc; } ul#ticker li a { color: #666; } ul#ticker li span { display: block; color: #06C; }</style> |