$(function() { $('.link-more').on('click', function() { if ($('.link-hidden').hasclass('up')) { $('.link-hidden').slideup(function() { $(this).removeclass('up'); }); } else { $('.link-hidden').slidedown(function() { $(this).addclass('up'); }); } }); // 底部合作客户图片轮播 var slider = $('.partner-img').bxslider({ mode: 'horizontal', auto: true, speed: 800 }); $('.pre').click(function() { slider.gotoprevslide(); }); $('.next').click(function() { slider.gotonextslide(); }); var slide = $('#homepage-banner').bxslider({ mode: 'fade', auto: true, speed: 800, onslideafter: function($slideelement) { slide.startauto(); } }); //成功内容显示框架 function hotscoll(target, hotlist) { var bind = function(target, hotlist) { var html = '
', itemhtml = '
  • [item]
  • '; var list = new array(); for (var i = 0; i < hotlist.length; i++) { list.push(itemhtml.replace("[item]", hotlist[i])); } var result = html.replace("[list]", list.join("")); var $target = $(target); $target.after(result); } var scroll = function(target) { //间隔 var timespan = 2 * 2000, //速度 speed = 200; var $ul = $(target); var $li = $ul.find('li:eq(0)'); //行高 var lineheight = $li.height(); //行高 var uheight = $ul.height(); window.doscroll = function(target, ulheight, liheight, speed, timespan) { var $ul = $(target); var mtop = - parseint($ul.css("margin-top")); var nexttop = "-" + (mtop + lineheight) + "px"; if ((ulheight - liheight) == mtop) { //最后一行 $ul.animate({ "margin-top": nexttop }, speed, "swing", function() { $(this).css("margin-top", "0px"); }); } else { $ul.animate({ "margin-top": nexttop }, speed); } settimeout('doscroll("' + target + '", ' + ulheight + ', ' + liheight + ', ' + speed + ', ' + timespan + ')', timespan); } doscroll(target, uheight, lineheight, speed, timespan); }; bind(target, hotlist); scroll(".hot-list"); } //合作客户链接到成功案例 $(".partner-img li").click(function() { location.href = "/successcase/case.html"; }); //$.ajax({ // url: "/case/caselist", // success: function (a) { // var s = new hotscoll("#homepage-banner", a); // } //}); }); function submitlayer() { $(".submit").css({ "left": (window.innerwidth / 2 - 300) + "px", "display": "block", "top": "-800px" }) $(".submit").animate({ "top": "90px", }, 500); }