// JavaScript Document function stopS(obj1,obj2){ $(obj1).hover(function(){ obj2.stopAutoplay(); },function(){ obj2.startAutoplay(); }); } $(function(){ $('.headernav .nav_main li').mouseenter(function(event) { var index = $(this).index(); $('.headnavBox').css('height','0px'); $('.headnavBox').css('display','none'); $('.headnavBox').css('border-top',''); $('.headnavBox').eq(index).css('height','auto'); $('.headnavBox').eq(index).css('display','block'); if(index==1){ $('.headnavBox').css('border-top',''); } if(index==5){ $('.headnavBox').css('border-top',''); } }).mouseleave(function(event) { $('.headnavBox').css('height','0px'); $('.headnavBox').css('display','none'); $('.headnavBox').css('border-top',''); }); $('.headnavBox').mouseenter(function(event) { $(this).css('height','auto'); $(this).css('display','block'); }).mouseleave(function(event) { $('.headnavBox').css('height','0px'); $('.headnavBox').css('display','none'); $('.headnavBox').css('border-top',''); }); //娉㈡氮鍔ㄧ敾 var marqueeScroll = function (id1, id2, id3, timer) { var $parent = $("#" + id1); var $goal = $("#" + id2); var $closegoal = $("#" + id3); $closegoal.html($goal.html()); function Marquee() { if (parseInt($parent.scrollLeft()) - $closegoal.width() >= 0) { $parent.scrollLeft(parseInt($parent.scrollLeft()) - $goal.width()); } else { $parent.scrollLeft($parent.scrollLeft() + 1); } } setInterval(Marquee, timer); } var marqueeScroll1 = new marqueeScroll("marquee-box", "wave-list-box1", "wave-list-box2", 20); var marqueeScroll2 = new marqueeScroll("marquee-box3", "wave-list-box4", "wave-list-box5", 40); })