<!DOCTYPE html>
<html lang="en">
<head>


 <script>
  $(function(){
   $('#slides').slides({
    preload: true,
    preloadImage: 'img/loading.gif',
    play: 5000,
    pause: 2500,
    hoverPause: true,
    animationStart: function(current){
     $('.caption').animate({
      bottom:-35
     },100);
     if (window.console && console.log) {
      // example return of current slide number
      console.log('animationStart on slide: ', current);
     };
    },
    animationComplete: function(current){
     $('.caption').animate({
      bottom:0
     },200);
     if (window.console && console.log) {
      // example return of current slide number
      console.log('animationComplete on slide: ', current);
     };
    },
    slidesLoaded: function() {
     $('.caption').animate({
      bottom:0
     },200);
    }
   });
  });
 </script>
 
  <style type="text/css">
<!--
#lovexin12,#lovexin14{
width:86px;
height:280px;
background-color:#ededed;
border:1px solid #ddd;
z-index:99;
}
html,body{
height:1203px;
}
#mm{
height:1000px;
}
-->
</style>


<script language="JavaScript" type="text/javascript">
lastScrollY=0;
function heartBeat(){
var diffY;
if (document.documentElement && document.documentElement.scrollTop)
diffY = document.documentElement.scrollTop;
else if (document.body)
diffY = document.body.scrollTop
else

percent=.1*(diffY-lastScrollY);
if(percent>0)percent=Math.ceil(percent);
else percent=Math.floor(percent);
document.getElementById("lovexin12").style.top=parseInt(document.getElementById
("lovexin12").style.top)+percent+"px";
document.getElementById("lovexin14").style.top=parseInt(document.getElementById
("lovexin12").style.top)+percent+"px";
lastScrollY=lastScrollY+percent;
}
suspendcode12="<DIV id=\"lovexin12\" style='left:2px;POSITION:absolute;TOP:360px; background-image:url(http://www.btv.com.cn/download/wb.jpg)'></div>"
suspendcode14="<DIV id=\"lovexin14\" style='right:2px;POSITION:absolute;TOP:360px;  background-image:url(http://www.btv.com.cn/download/wpt.jpg)'></div>"
document.write(suspendcode12);
document.write(suspendcode14);
window.setInterval("heartBeat()",1);
</script>


</html>

posted on 2013-03-27 14:26  点滴汪洋  阅读(273)  评论(0编辑  收藏  举报