Código HTML:
<head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Featured Content Slider</title> <link rel="stylesheet" type="text/css" href="style.css" /> <script type="text/javascript" src="js/jquery-1.2.6.min.js"></script> <script type="text/javascript" src="js/jquery-easing-1.3.pack.js"></script> <script type="text/javascript" src="js/jquery-easing-compatibility.1.2.pack.js"></script> <script type="text/javascript" src="js/coda-slider.1.1.1.pack.js"></script> <script type="text/javascript"> var theInt = null; var $crosslink, $navthumb; var curclicked = 0; theInterval = function(cur){ clearInterval(theInt); if( typeof cur != 'undefined' ) curclicked = cur; $crosslink.removeClass("active-thumb"); $navthumb.eq(curclicked).parent().addClass("active-thumb"); $(".stripNav ul li a").eq(curclicked).trigger('click'); theInt = setInterval(function(){ $crosslink.removeClass("active-thumb"); $navthumb.eq(curclicked).parent().addClass("active-thumb"); $(".stripNav ul li a").eq(curclicked).trigger('click'); curclicked++; if( 6 == curclicked ) curclicked = 0; }, 3000); }; $(function(){ $("#main-photo-slider").codaSlider(); $navthumb = $(".nav-thumb"); $crosslink = $(".cross-link"); $navthumb .click(function() { var $this = $(this); theInterval($this.parent().attr('href').slice(1) - 1); return false; }); theInterval(); }); </script> </head> <body> <div id="page-wrap"> <div class="slider-wrap"> <div id="main-photo-slider" class="csw"> <div class="panelContainer"> <div class="panel" title="Panel 1"> <div class="wrapper"> <img src="images/tempphoto-1.jpg" alt="temp" /> <div class="photo-meta-data"> <span>"Free Tibet" Protest at the Olympic Torch Rally</span> </div> </div> </div> <div class="panel" title="Panel 2"> <div class="wrapper"> <div class="photo-meta-data"> Chicago Bears at Seattle Seahawkss<br /> <span>Fifth field goal, overtime win for the Seahawks smarco</span> </div> </div> </div> <div class="panel" title="Panel 3"> <div class="wrapper"> <img src="images/scotch-egg.jpg" alt="scotch egg" class="floatLeft"/> <h1>How to Cook a Scotch Egg</h1> <ul> <li>6 hard-boiled eggs, well chilled (i try to cook them to just past soft boiled stage, then stick them in the coldest part of the fridge to firm up)</li> <li>1 pound good quality sausage meat (i used ground turkey meat, seasoned with sage, white pepper, salt and a tiny bit of maple syrup)</li> <li>1/2 cup AP flour</li> <li>1-2 eggs, beaten</li> <li>3/4 cup panko-style bread crumbs</li> <li>Vegetable oil for frying</li> </ul> </div> </div> <div class="panel" title="Panel 4"> <div class="wrapper"> <img src="images/tempphoto-4.jpg" alt="temp" /> <div class="photo-meta-data"> A Poem by Shel Silverstein<br /> <span>Falling Up</span> </div> </div> </div> <div class="panel" title="Panel 5"> <div class="wrapper"> <img src="images/tempphoto-5.jpg" alt="temp" /> <div class="photo-meta-data"> New Video on CSS-Tricks<br /> <span>Using Wufoo for Web Forms</span> </div> </div> </div> <div class="panel" title="Panel 6"> <div class="wrapper"> <h1>A Tale of Two Cities</h1> <p><em>Charles Dickins</em></p> <blockquote>It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness, it was the epoch of belief, it was the epoch of incredulity, it was the season of Light, it was the season of Darkness, it was the spring of hope, it was the winter of despair, we had everything before us, we had nothing before us, we were all going direct to heaven, we were all going direct the other way - in short, the period was so far like the present period, that some of its noisiest authorities insisted on its being received, for good or for evil, in the superlative degree of comparison only.</blockquote> </div> </div> </div> </div> <img src="images/tempphoto-1thumb.jpg" class="nav-thumb" alt="temp-thumb" /> <div id="movers-row"> </div> </div> </div> </body> </html>
Código css:
Ver original
1. /* kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk 2. Featured Content Slider 3. by: Chris Coyier 4. */ 5. 6. 7. 8. /* 9. UTILITY STYLES 10. */ 11. 12. .floatLeft { float: left; margin-right: 0px;} 13. .floatRight { float: right; } 14. .clear { clear: both; } 15. a { outline: none; } 16. 17. 18. /* 19. PAGE STRUCTURE 20. */ 21. #page-wrap { width: 500px; margin: 0px auto; position: relative; min-height: 330px; 22. background: url(images/bg.png) top center; 23. 24. } 25. 26. 27. /* 28. TYPOGRAPHY 29. */ 30. ul { list-style: square inside; } 31. a, a:visited { color: #729dff; text-decoration: none; } 32. a:hover, a:active { color: white; } 33. blockquote { padding: 0 20px; margin-left: 0px; border-left: 0px solid #ccc; font-size: 14px; 34. font-family: Georgia, serif; font-style: italic; margin-top: 0px;} 35. /* 36. SLIDER 37. */ 38. .slider-wrap { width: 419px; position: absolute; left: 0px; 39. border: 1px solid #000; 40. } 41. .stripViewer .panelContainer 42. .panel ul { text-align: left; margin: 0 15px 0 30px; border: 1px solid #0C71C2;} 43. .stripViewer { position: relative; overflow: hidden; width: 419px; height: 285px; } 44. .stripViewer .panelContainer { position: relative; left: 0; top: 0; } 45. .stripViewer .panelContainer .panel { float: left; height: 100%; position: relative; width: 419px; } 46. .stripNavL, .stripNavR, .stripNav { display: none; } 47. .nav-thumb { border: 1px solid black; margin-right: 5px; } 48. #movers-row { margin: -43px 0 0 62px; } 49. #movers-row div { width: 20%; float: left; } 50. #movers-row div a.cross-link { float: right; } 51. .photo-meta-data { background: url(./imagenes/transpBlack.png); padding: 10px; height: 30px; 52. margin-top: -50px; position: relative; z-index: 9999; color: white; } 53. .photo-meta-data span { font-size: 13px;} 54. .cross-link { display: block; width: 62px; margin-top: -14px; 55. position: relative; padding-top: 15px; z-index: 9999; } 56. .active-thumb { background: transparent url(./imagenes/icon-uparrowsmallwhite.png) top center no-repeat;