Working.js 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. $('.lis').hide()
  2. $('.lis').eq(1).show()
  3. $('.atbs').click(function() {
  4. var i = $(this).attr('data-ids')
  5. $('.atbs').attr('class', 'atbs')
  6. $(this).attr('class', 'atbs on')
  7. // $('.lis').attr('class', 'lis hide')
  8. // $('.lis').eq(i).attr('class', 'lis show')
  9. $('.lis').hide()
  10. $('.lis').eq(i).fadeToggle(1000)
  11. })
  12. // 轮播图
  13. var index = 1;
  14. var newLeft = 0;
  15. var interval;
  16. var buttSpan = $(".buttss").children();
  17. function nextPage(next){
  18. $(buttSpan[index-1]).removeClass("ons");
  19. if(index == 1) {
  20. $('#tiltsl').html('唐古信息科技 总经理')
  21. $('#ppls').html('「 对比多家供应商后,我们选择了工时管家,事实证明我们的选择是正确的,制药生产车间的各个环节人工成本得以数据化,我们实现了远程的成本把控。」')
  22. }
  23. if(index == 2) {
  24. $('#tiltsl').html('成都中为工程技术 项目主管')
  25. $('#ppls').html('「 我们是做建筑工程设计的,需要把控每个项目的投入成本。工时管家系统提供了面向工程专业的系统化、标准化的工时统计,我们得以进行更好的财务核算及人力成本控制!」')
  26. }
  27. if(index == 3) {
  28. $('#tiltsl').html('芯传汇 财务总监')
  29. $('#ppls').html('「 企业上市对我们的财务提出了严格的要求,工时管家系统帮助我们达到了目标。每个月的成本可以自动分摊到项目上,精确化管理研发项目成本,非常方便好用。」')
  30. }
  31. if(next){
  32. if(index == 3){
  33. index = 1;
  34. newLeft = 0;
  35. }
  36. else{
  37. index ++;
  38. newLeft = -1000*(index-1);
  39. }
  40. }
  41. else{
  42. if(index == 1){
  43. index = 3;
  44. newLeft = -2000;
  45. }
  46. else{
  47. index --;
  48. newLeft = -1000*(index-1);
  49. }
  50. }
  51. $(".listss").css("left",newLeft + 'px');
  52. $(buttSpan[index-1]).addClass("ons");
  53. }
  54. function autoNextPage(){
  55. interval = setInterval(function(){
  56. nextPage(true);
  57. },"5000");
  58. }
  59. autoNextPage();
  60. $(".containerss").mouseover(function(){
  61. clearInterval(interval);
  62. $(".arrows").css("display","block");
  63. });
  64. $(".containerss").mouseout(function(){
  65. autoNextPage();
  66. $(".arrows").css("display","block");
  67. });
  68. $(".lefts").click(function(){
  69. nextPage(false);
  70. });
  71. $(".rights").click(function(){
  72. nextPage(true);
  73. });
  74. function clickButt(){
  75. for(var i = 0;i<5;i++){
  76. $(buttSpan[i]).click(function(){
  77. $(buttSpan[index-1]).removeClass("ons");
  78. index = $(this).attr("index")-1;
  79. nextPage(true);
  80. });
  81. }
  82. }
  83. clickButt();