$(document).ready(function () { $('.a-process').on('click',moveBar); $('.update-to-perm').on('click',showPerMsg); $('.notice-child').on('mouseenter',shownoticeText).on('mouseleave',hideText); }) function moveBar() { var distanse=21+($(this).index()-1)*91; $('.point-bar').css({'top':distanse.toString()+'px','visibility':'visible'}); } function scrollAds() { var scrolling=document.getElementsByClassName('scroll-ads-imgs').item(0); if(scrolling==null) { clearInterval(start_scoll); } else { if(scrolling.style.transform=="translateX(0%)") { $('.scroll-ads-imgs').css('transition','0.4s'); scrolling.style.transform='translateX(-100%)'; $('.white-point').eq(1).css("width","20px"); $('.white-point').eq(2).css("width","10px"); $('.white-point').eq(0).css("width","10px"); } else if(scrolling.style.transform=="translateX(-100%)") { scrolling.style.transform='translateX(-200%)'; $('.white-point').eq(2).css("width","20px"); $('.white-point').eq(1).css("width","10px"); $('.white-point').eq(0).css("width","10px"); } else if(scrolling.style.transform=="translateX(-200%)") { scrolling.style.transform='translateX(-300%)'; $('.white-point').eq(0).css("width","20px"); $('.white-point').eq(2).css("width","10px"); $('.white-point').eq(1).css("width","10px"); } else if(scrolling.style.transform=="translateX(-300%)") { $('.scroll-ads-imgs').css('transition','none'); scrolling.style.transform='translateX(0%)'; window.setTimeout('scrollAds()',200); $('.white-point').eq(0).css("width","20px"); $('.white-point').eq(1).css("width","10px"); $('.white-point').eq(2).css("width","10px"); } } } var start_scoll=window.setInterval('scrollAds()',3000); function shownoticeText() { $(this).addClass("select"); } function hideText() { $(this).removeClass("select"); } function showPerMsg(e) { e.preventDefault(); $('.link-point').eq(0).click(); }