Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <head>
- <title>Slider</title>
- <script type="text/javascript" src="jquery.js"></script>
- <script>
- var i = 1;
- var slider = function(){
- $("#slider li").hide();
- $("#slider li").eq(i-1).fadeIn("slow");
- var max = $("#slider li").size();
- if (i < max) { i++; } else i=1;
- };
- timer = window.setInterval(slider, 2000);
- </script>
- </head>
- <body>
- <div id="left">
- <ul id="slider">
- <li>
- <div style="width:100px; height:100px; background:#f00f00;">
- <div style="margin-top:80px; width:100px; height:20px; position:absolute; opacity:0.75; background:#000000; color:#ffffff;">Текст блока</div>
- </div>
- </li>
- <li>
- <div style="width:100px; height:100px; background:#ff006f;">
- <div style="margin-top:80px; width:100px; height:20px; position:absolute; opacity:0.75; background:#000000; color:#ffffff;">Текст блока</div>
- </div>
- </li>
- </ul>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement