//JS判断页面加载完毕,再隐藏加载效果层,一个简单的JS加载效果。 document.onreadystatechange = function () { if(document.readyState=="complete") { setTimeout("$('#box_loading').animate({top:'-1100px'}, 500); ", 2000) } } $(document).ready(function(){ //页面上的一些小动画 $("#box_loading a").click(function(){ $('#box_loading').stop().animate({top:"-1100px"},500); }); //关于我们栏目点击 read more 出现二级内容页 $("#about .more_cont").click(function(){ setTimeout("$('#about_cont').stop().animate({height:'1100px'},500); ", 850) }); $("#about_cont .close_btu").click(function(){ $('#about_cont').stop().animate({height:"0px"},500); }); $(".FrontNews_list01-d2_c2 li.content").hover( function () { $(this).addClass("li_bg"); //鼠标经过时增加样式bg }, function () { $(this).removeClass("li_bg"); //鼠标离开时移除样式bg } ) //页面平移效果 $('#nav').localScroll(1100); $('.top_rim').localScroll(1100); $('.about_rim').localScroll(1100); $('#box_news').localScroll(1100); //.parallax(xPosition, speedFactor, outerHeight) options: //xPosition - Horizontal position of the element //inertia - speed to move relative to vertical scroll. Example: 0.1 is one tenth the speed of scrolling, 2 is twice the speed of scrolling //outerHeight (true/false) - Whether or not jQuery should use it's outerHeight option to determine when a section is in the viewport //设置各栏目背景层错位效果。数值可以更改。 $('#box_about').parallax("50%", 0.1); $('#box_news').parallax("50%", 0.1); $('#box_news').parallax("50%", 0.1); $('#box_jishu').parallax("50%", 0.1); $('#box_jiexie').parallax("50%", 0.1); $('#box_xiuli').parallax("50%", 0.1); $('#box_hezuo').parallax("50%", 0.1); $('#box_liuyan').parallax("50%", 0.1); $('#box_bottom').parallax("50%", 0.1); $('.sprite').parallax("50%", 0); $('#box_about_sub2').parallax("50%", 0-0.5); $('#box_news_sub2').parallax("50%", 0-0.5); $('#box_jishu_sub2').parallax("50%", 0-0.5); $('#box_jiexie_sub2').parallax("50%", 0-0.5); $('#box_xiuli_sub2').parallax("50%", 0-0.5); $('#box_hezuo_sub2').parallax("50%", 0-0.5); $('#products .screen').parallax("50%", 0-0.5); $('#about .screen').parallax("50%", 0-0.5); $('#about_cont .screen').parallax("50%", 0-0.5); $('#about_cont .sprite').parallax("50%", 0-0.5); $('#about_cont .screen1').parallax("50%", 0-0.1); $('#sector .screen').parallax("50%", 0-0.5); $('#home .sprite1').parallax("50%", 0-0.5); $('#famous .sprite').parallax("50%", 0-0.5); $('#sector .sprite').parallax("50%", 0-0.5); }) function SlyarErrors() { return true; } window.onerror = SlyarErrors;