?
Path : /home/admin/domains/happytokorea.com/public_html_bk/test3/hotel/ |
Current File : /home/admin/domains/happytokorea.com/public_html_bk/test3/hotel/rotator.htm |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!-- saved from url=(0073)http://www.alohatechsupport.net/examples/image-rotator/image-rotator.html --> <html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Easy Jquery Auto Slideshow Image Rotator</title> <style type="text/css"> body { margin:0; padding:0; color: #4E3D4E; font: normal 0.6em sans-serif, Arial; background-color: #EDEDED; width: 100%; } a { outline: none; } </style> <style type="text/css"> /* rotator in-page placement */ div#rotator { position:absolute; height:180px; margin: 2px 0 0 2px; } /* rotator css */ div#rotator ul{ float:left; position:absolute; list-style: none; padding: 0; margin: 0; } div#rotator ul li { float:left; position:absolute; list-style: none; padding: 0; margin: 0; } /* rotator image style */ div#rotator ul li img { border:0px solid #ccc; padding: 0px; background: #FFF; } div#rotator ul li.show { z-index:100 } </style> <script type="text/javascript" src="./rotator/jquery.min.js"></script> <!-- By Dylan Wagstaff, http://www.alohatechsupport.net --> <script type="text/javascript"> function theRotator() { //Set the opacity of all images to 0 $('div#rotator ul li').css({opacity: 0.0}); //Get the first image and display it (gets set to full opacity) $('div#rotator ul li:first').css({opacity: 1.0}); //Call the rotator function to run the slideshow, 6000 = change to next image after 6 seconds setInterval('rotate()',4000); } function rotate() { //Get the first image var current = ($('div#rotator ul li.show')? $('div#rotator ul li.show') : $('div#rotator ul li:first')); //Get next image, when it reaches the end, rotate it back to the first image var next = ((current.next().length) ? ((current.next().hasClass('show')) ? $('div#rotator ul li:first') :current.next()) : $('div#rotator ul li:first')); //Set the fade in effect for the next image, the show class has higher z-index next.css({opacity: 0.0}) .addClass('show') .animate({opacity: 1.0}, 1000); //Hide the current image current.animate({opacity: 0.0}, 1000) .removeClass('show'); }; $(document).ready(function() { //Load the slideshow theRotator(); }); </script> </head> <body> <div id="rotator"> <ul> <li class="show" style="opacity: 1; "><img src="./rotator/image1.jpg" width="695" height="180" alt="pic1"></li> <li style="opacity: 0; " class=""><img src="./rotator/image2.jpg" width="695" height="180" alt="pic2"></li> </ul> </div> </body></html>